Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Be more explicit about BOOL (#20564)
Kyle Kelley54735199a487
diff --git a/crates/gpui/src/platform/mac/window.rs b/crates/gpui/src/platform/mac/window.rsindex f0a80a22076..e4ee3055387 100644--- a/crates/gpui/src/platform/mac/window.rs+++ b/crates/gpui/src/platform/mac/window.rs@@ -1262,13 +1262,13 @@ extern "C" fn handle_key_event(this: &Object, native_event: id, key_equivalent:}let mut callback = window_state.as_ref().lock().event_callback.take();- let handled = if let Some(callback) = callback.as_mut() {+ let handled: BOOL = if let Some(callback) = callback.as_mut() {!callback(PlatformInput::KeyDown(event)).propagate} else {- false+ NO};window_state.as_ref().lock().event_callback = callback;- return handled;+ return handled as BOOL;}let mut callback = window_state.as_ref().lock().event_callback.take();@@ -1279,7 +1279,7 @@ extern "C" fn handle_key_event(this: &Object, native_event: id, key_equivalent:};window_state.as_ref().lock().event_callback = callback;if handled {- return handled;+ return YES;}if event.is_held {@@ -1289,9 +1289,9 @@ extern "C" fn handle_key_event(this: &Object, native_event: id, key_equivalent:None,&event.keystroke.ime_key.unwrap_or(event.keystroke.key),);- return true;+ return YES;}- false+ NO});if handled == Some(true) {return YES;