diff --git a/espanso-detect/src/evdev/mod.rs b/espanso-detect/src/evdev/mod.rs index 9c90ca35..f7d147d1 100644 --- a/espanso-detect/src/evdev/mod.rs +++ b/espanso-detect/src/evdev/mod.rs @@ -86,7 +86,7 @@ pub struct EVDEVSource { #[allow(clippy::new_without_default)] impl EVDEVSource { - pub fn new(options: SourceCreationOptions) -> EVDEVSource { + pub fn new(options: &SourceCreationOptions) -> EVDEVSource { let mut modifiers_map = HashMap::new(); modifiers_map.insert("ctrl".to_string(), KEY_CTRL + EVDEV_OFFSET); modifiers_map.insert("shift".to_string(), KEY_SHIFT + EVDEV_OFFSET); diff --git a/espanso-detect/src/lib.rs b/espanso-detect/src/lib.rs index f6a60106..49ec883a 100644 --- a/espanso-detect/src/lib.rs +++ b/espanso-detect/src/lib.rs @@ -122,7 +122,7 @@ pub fn get_source(options: &SourceCreationOptions) -> Result> { Ok(Box::new(evdev::EVDEVSource::new(options))) } else { info!("using X11Source"); - Ok(Box::new(x11::X11Source::new(&options.hotkeys))) + Ok(Box::new(x11::X11Source::new(options.hotkeys))) } }