mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-21 20:20:55 +03:00
fix remaining clippy lints
This commit is contained in:
@@ -140,7 +140,7 @@ impl EventConsumer for MacOSConsumer {
|
||||
}
|
||||
};
|
||||
// store button state
|
||||
self.button_state[mouse_button] = if state == 1 { true } else { false };
|
||||
self.button_state[mouse_button] = state == 1;
|
||||
|
||||
let location = self.get_mouse_location().unwrap();
|
||||
let event = match CGEvent::new_mouse_event(
|
||||
|
||||
@@ -80,7 +80,7 @@ fn send_mouse_input(mi: MOUSEINPUT) {
|
||||
};
|
||||
|
||||
SendInput(
|
||||
1 as u32,
|
||||
1_u32,
|
||||
&mut input as LPINPUT,
|
||||
std::mem::size_of::<INPUT>() as i32,
|
||||
);
|
||||
@@ -173,7 +173,7 @@ fn send_keyboard_input(ki: KEYBDINPUT) {
|
||||
u: std::mem::zeroed(),
|
||||
};
|
||||
*input.u.ki_mut() = ki;
|
||||
SendInput(1 as u32, &mut input, std::mem::size_of::<INPUT>() as i32);
|
||||
SendInput(1_u32, &mut input, std::mem::size_of::<INPUT>() as i32);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user