From 5a50d9551fcd42613fab0bb4f4d3b33f4a779002 Mon Sep 17 00:00:00 2001 From: pentamassiv Date: Fri, 19 Apr 2024 11:57:00 +0200 Subject: [PATCH] s --- src/win/win_impl.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/win/win_impl.rs b/src/win/win_impl.rs index c6328276..e27dbb58 100644 --- a/src/win/win_impl.rs +++ b/src/win/win_impl.rs @@ -455,8 +455,6 @@ impl Enigo { if virtual_key < 0 { return Err(InputError::Mapping("Could not translate the character to the corresponding virtual-key code and shift state for the current keyboard".to_string())); } - // unwrapping here is safe because the value is always a positive value of i16 - // so it must fit let virtual_key = VIRTUAL_KEY(virtual_key as u16); let scan_code = Enigo::get_scancode(virtual_key, layout)?; results.push((virtual_key, scan_code));