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 <fabianlars@fabianlars.de>
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
This commit is contained in:
renovate[bot]
2024-04-18 17:05:15 +02:00
committed by GitHub
parent 35373956ea
commit 78a4097d09
4 changed files with 13 additions and 18 deletions
+1 -1
View File
@@ -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"
+6
View File
@@ -24,3 +24,9 @@ impl From<global_hotkey::Error> for Error {
Self::GlobalHotkey(value.to_string())
}
}
impl From<global_hotkey::hotkey::HotKeyParseError> for Error {
fn from(value: global_hotkey::hotkey::HotKeyParseError) -> Self {
Self::GlobalHotkey(value.to_string())
}
}
+1 -1
View File
@@ -44,7 +44,7 @@ impl From<Shortcut> 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<Self, Self::Error> {
Shortcut::from_str(value).map(ShortcutWrapper)
}