From 78a4097d09d9d355d826c8b2112d3b730a5d3e53 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:05:15 +0200 Subject: [PATCH] fix(deps): update rust crate global-hotkey to 0.5.1 (#1211) * fix(deps): update rust crate global-hotkey to 0.5.1 * fix comp * Update Cargo.toml --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: FabianLars Co-authored-by: Amr Bashir --- Cargo.lock | 21 +++++---------------- plugins/global-shortcut/Cargo.toml | 2 +- plugins/global-shortcut/src/error.rs | 6 ++++++ plugins/global-shortcut/src/lib.rs | 2 +- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e5d20ce5..caa04557 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2438,15 +2438,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "global-hotkey" -version = "0.2.4" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c12993a445d59000c3994fcd3d179e7da026a4234cc46db652987aa2785e4a" +checksum = "5b0d37e95d3937251ee2019709389bb793c1237f16d45fc0fe7b2464b5f97c68" dependencies = [ "crossbeam-channel", - "keyboard-types 0.6.2", + "keyboard-types", "once_cell", "thiserror", - "windows-sys 0.48.0", + "windows-sys 0.52.0", "x11-dl", ] @@ -3103,17 +3103,6 @@ dependencies = [ "treediff", ] -[[package]] -name = "keyboard-types" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7668b7cff6a51fe61cdde64cd27c8a220786f399501b57ebe36f7d8112fd68" -dependencies = [ - "bitflags 1.3.2", - "serde", - "unicode-segmentation", -] - [[package]] name = "keyboard-types" version = "0.7.0" @@ -3507,7 +3496,7 @@ dependencies = [ "crossbeam-channel", "dpi", "gtk", - "keyboard-types 0.7.0", + "keyboard-types", "objc", "once_cell", "png", diff --git a/plugins/global-shortcut/Cargo.toml b/plugins/global-shortcut/Cargo.toml index df757225..dbbc1996 100644 --- a/plugins/global-shortcut/Cargo.toml +++ b/plugins/global-shortcut/Cargo.toml @@ -24,4 +24,4 @@ log = { workspace = true } thiserror = { workspace = true } [target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies] -global-hotkey = "0.2.1" +global-hotkey = "0.5" diff --git a/plugins/global-shortcut/src/error.rs b/plugins/global-shortcut/src/error.rs index 8157000c..a1e366a7 100644 --- a/plugins/global-shortcut/src/error.rs +++ b/plugins/global-shortcut/src/error.rs @@ -24,3 +24,9 @@ impl From for Error { Self::GlobalHotkey(value.to_string()) } } + +impl From for Error { + fn from(value: global_hotkey::hotkey::HotKeyParseError) -> Self { + Self::GlobalHotkey(value.to_string()) + } +} diff --git a/plugins/global-shortcut/src/lib.rs b/plugins/global-shortcut/src/lib.rs index 6680c78d..95f61a9a 100644 --- a/plugins/global-shortcut/src/lib.rs +++ b/plugins/global-shortcut/src/lib.rs @@ -44,7 +44,7 @@ impl From for ShortcutWrapper { } impl TryFrom<&str> for ShortcutWrapper { - type Error = global_hotkey::Error; + type Error = global_hotkey::hotkey::HotKeyParseError; fn try_from(value: &str) -> std::result::Result { Shortcut::from_str(value).map(ShortcutWrapper) }