Fix formatting
This commit is contained in:
@@ -13,10 +13,7 @@ impl std::ops::Deref for StaffMode {
|
||||
|
||||
/// Despite what the type system requires me to tell you, the init function will only be called a once
|
||||
/// as soon as we know that the staff mode is enabled.
|
||||
pub fn staff_mode<F: FnMut(&mut AppContext) + 'static>(
|
||||
cx: &mut AppContext,
|
||||
mut init: F,
|
||||
) {
|
||||
pub fn staff_mode<F: FnMut(&mut AppContext) + 'static>(cx: &mut AppContext, mut init: F) {
|
||||
if **cx.default_global::<StaffMode>() {
|
||||
init(cx)
|
||||
} else {
|
||||
@@ -32,10 +29,7 @@ pub fn staff_mode<F: FnMut(&mut AppContext) + 'static>(
|
||||
|
||||
/// Immediately checks and runs the init function if the staff mode is not enabled.
|
||||
/// This is only included for symettry with staff_mode() above
|
||||
pub fn not_staff_mode<F: FnOnce(&mut AppContext) + 'static>(
|
||||
cx: &mut AppContext,
|
||||
init: F,
|
||||
) {
|
||||
pub fn not_staff_mode<F: FnOnce(&mut AppContext) + 'static>(cx: &mut AppContext, init: F) {
|
||||
if !**cx.default_global::<StaffMode>() {
|
||||
init(cx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user