Fix warning

This commit is contained in:
Lennard Kittner
2026-03-20 12:47:49 +01:00
parent 1c89bd6f0c
commit 6413102413
2 changed files with 4 additions and 5 deletions

View File

@@ -137,11 +137,11 @@ pub fn connect_compatible_device() -> Result<Box<dyn Device>, DeviceError> {
.expect("Why is there a device without packets ???"); .expect("Why is there a device without packets ???");
test_device.prepare_write(); test_device.prepare_write();
if let Err(e) = test_device if let Err(_e) = test_device
.get_device_state() .get_device_state()
.write_hid_report(&probe_packet) .write_hid_report(&probe_packet)
{ {
debug_println!("Failed to open: {e:?}"); debug_println!("Failed to open: {_e:?}");
continue; continue;
} else { } else {
device = Some(test_device); device = Some(test_device);

View File

@@ -86,10 +86,9 @@ fn main() {
}; };
if mute_state.is_some() if mute_state.is_some()
&& mute_state != device.get_device_state().device_properties.muted && mute_state != device.get_device_state().device_properties.muted
&& press_mute_key
{ {
if press_mute_key { enigo.key(Key::F20, Direction::Click).unwrap();
enigo.key(Key::F20, Direction::Click).unwrap();
}
} }
// with the default refresh_interval the state is only actively queried every 3min // with the default refresh_interval the state is only actively queried every 3min