|
1 | 1 | use crate::{ |
2 | 2 | BoolExt, DisplayLink, MacDisplay, NSRange, NSStringExt, TISCopyCurrentKeyboardInputSource, |
3 | 3 | TISGetInputSourceProperty, events::platform_input_from_native, |
4 | | - kTISPropertyInputSourceIsASCIICapable, kTISPropertyInputSourceType, |
5 | | - kTISTypeKeyboardInputMode, ns_string, renderer, |
| 4 | + kTISPropertyInputSourceIsASCIICapable, kTISPropertyInputSourceType, kTISTypeKeyboardInputMode, |
| 5 | + ns_string, renderer, |
6 | 6 | }; |
7 | 7 | #[cfg(any(test, feature = "test-support"))] |
8 | 8 | use anyhow::Result; |
@@ -1774,19 +1774,19 @@ unsafe fn is_ime_input_source_active() -> bool { |
1774 | 1774 | return false; |
1775 | 1775 | } |
1776 | 1776 |
|
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); |
1781 | 1779 | 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; |
1783 | 1784 |
|
1784 | 1785 | let is_ascii = TISGetInputSourceProperty( |
1785 | 1786 | source, |
1786 | 1787 | kTISPropertyInputSourceIsASCIICapable as *const c_void, |
1787 | 1788 | ); |
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); |
1790 | 1790 |
|
1791 | 1791 | CFRelease(source as CFTypeRef); |
1792 | 1792 |
|
|
0 commit comments