Skip to content

Commit b4fa8fe

Browse files
cyrganinot-fl3
authored andcommitted
simplify redundant std::char paths
1 parent c280723 commit b4fa8fe

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/native/linux_wayland.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ where
771771

772772
let chr = keycodes::keysym_to_unicode(&mut display.xkb, *keysym);
773773
if chr > 0 {
774-
if let Some(chr) = std::char::from_u32(chr as u32) {
774+
if let Some(chr) = char::from_u32(chr as u32) {
775775
event_handler.char_event(chr, keymods, true);
776776
}
777777
}
@@ -821,7 +821,7 @@ where
821821

822822
let chr = keycodes::keysym_to_unicode(&mut display.xkb, keysym);
823823
if chr > 0 {
824-
if let Some(chr) = std::char::from_u32(chr as u32) {
824+
if let Some(chr) = char::from_u32(chr as u32) {
825825
event_handler.char_event(chr, keymods, false);
826826
}
827827
}

src/native/linux_x11.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl X11Display {
6767
);
6868
let chr = keycodes::keysym_to_unicode(&mut self.libxkbcommon, keysym);
6969
if chr > 0 {
70-
if let Some(chr) = std::char::from_u32(chr as u32) {
70+
if let Some(chr) = char::from_u32(chr as u32) {
7171
event_handler.char_event(chr, mods, repeat);
7272
}
7373
}

src/native/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ unsafe extern "system" fn win32_wndproc(
462462
let repeat = !!(lparam & 0x40000000) != 0;
463463
let mods = key_mods();
464464
if chr > 0 {
465-
if let Some(chr) = std::char::from_u32(chr as u32) {
465+
if let Some(chr) = char::from_u32(chr as u32) {
466466
event_handler.char_event(chr, mods, repeat);
467467
}
468468
}

0 commit comments

Comments
 (0)