From 947edb0cbfc79af61869f6ff56b863ae4903e65a Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Wed, 6 Oct 2021 19:17:59 +0200 Subject: [PATCH] fix(detect): fix warnings --- espanso-detect/src/evdev/ffi.rs | 1 + espanso-detect/src/evdev/mod.rs | 2 +- espanso-detect/src/x11/mod.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/espanso-detect/src/evdev/ffi.rs b/espanso-detect/src/evdev/ffi.rs index e242ca5..b7b3e19 100644 --- a/espanso-detect/src/evdev/ffi.rs +++ b/espanso-detect/src/evdev/ffi.rs @@ -25,6 +25,7 @@ pub struct xkb_rule_names { } #[repr(C)] +#[allow(clippy::upper_case_acronyms)] pub enum xkb_key_direction { UP, DOWN, diff --git a/espanso-detect/src/evdev/mod.rs b/espanso-detect/src/evdev/mod.rs index 2f87cf8..d7d6337 100644 --- a/espanso-detect/src/evdev/mod.rs +++ b/espanso-detect/src/evdev/mod.rs @@ -214,7 +214,7 @@ impl Source for EVDEVSource { if let Some(event) = event { // On Wayland we need to detect the global shortcuts manually if let InputEvent::Keyboard(key_event) = &event { - if let Some(hotkey) = (*hotkey_filter).process_event(&key_event) { + if let Some(hotkey) = (*hotkey_filter).process_event(key_event) { event_callback(InputEvent::HotKey(HotKeyEvent { hotkey_id: hotkey })) } } diff --git a/espanso-detect/src/x11/mod.rs b/espanso-detect/src/x11/mod.rs index 1ef1d0b..8665ee4 100644 --- a/espanso-detect/src/x11/mod.rs +++ b/espanso-detect/src/x11/mod.rs @@ -163,7 +163,7 @@ impl Source for X11Source { // Register the hotkeys let raw_hotkey_mapping = &mut self.raw_hotkey_mapping; self.hotkeys.iter().for_each(|hk| { - let raw = convert_hotkey_to_raw(&hk); + let raw = convert_hotkey_to_raw(hk); if let Some(raw_hk) = raw { let result = unsafe { detect_register_hotkey(handle, raw_hk, mod_indexes) }; if result.success == 0 {