Skip to content

Commit 66ebae7

Browse files
committed
fix: failure cargo fmt check
1 parent 0fae506 commit 66ebae7

2 files changed

Lines changed: 10 additions & 13 deletions

File tree

crates/gpui/src/platform.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,10 +1099,7 @@ impl PlatformInputHandler {
10991099
#[allow(dead_code)]
11001100
pub fn query_prefers_ime_for_printable_keys(&mut self) -> bool {
11011101
self.cx
1102-
.update(|window, cx| {
1103-
self.handler
1104-
.prefers_ime_for_printable_keys(window, cx)
1105-
})
1102+
.update(|window, cx| self.handler.prefers_ime_for_printable_keys(window, cx))
11061103
.unwrap_or(false)
11071104
}
11081105
}

crates/gpui_macos/src/window.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::{
22
BoolExt, DisplayLink, MacDisplay, NSRange, NSStringExt, TISCopyCurrentKeyboardInputSource,
33
TISGetInputSourceProperty, events::platform_input_from_native,
4-
kTISPropertyInputSourceIsASCIICapable, kTISPropertyInputSourceType,
5-
kTISTypeKeyboardInputMode, ns_string, renderer,
4+
kTISPropertyInputSourceIsASCIICapable, kTISPropertyInputSourceType, kTISTypeKeyboardInputMode,
5+
ns_string, renderer,
66
};
77
#[cfg(any(test, feature = "test-support"))]
88
use anyhow::Result;
@@ -1774,19 +1774,19 @@ unsafe fn is_ime_input_source_active() -> bool {
17741774
return false;
17751775
}
17761776

1777-
let source_type = TISGetInputSourceProperty(
1778-
source,
1779-
kTISPropertyInputSourceType as *const c_void,
1780-
);
1777+
let source_type =
1778+
TISGetInputSourceProperty(source, kTISPropertyInputSourceType as *const c_void);
17811779
let is_input_mode = !source_type.is_null()
1782-
&& CFEqual(source_type as CFTypeRef, kTISTypeKeyboardInputMode as CFTypeRef) != 0;
1780+
&& CFEqual(
1781+
source_type as CFTypeRef,
1782+
kTISTypeKeyboardInputMode as CFTypeRef,
1783+
) != 0;
17831784

17841785
let is_ascii = TISGetInputSourceProperty(
17851786
source,
17861787
kTISPropertyInputSourceIsASCIICapable as *const c_void,
17871788
);
1788-
let is_ascii_capable =
1789-
!is_ascii.is_null() && CFBooleanGetValue(is_ascii as CFBooleanRef);
1789+
let is_ascii_capable = !is_ascii.is_null() && CFBooleanGetValue(is_ascii as CFBooleanRef);
17901790

17911791
CFRelease(source as CFTypeRef);
17921792

0 commit comments

Comments
 (0)