diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:22 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:22 +0100 |
commit | 767b1c878532924775d5be7307e5aec10872e443 (patch) | |
tree | fcce38e88c3ffdb444095a1a90aee3c62c5afb68 /stockton-input/src | |
parent | e8126750633fd9ed3e682a2c889740a1f51a86f7 (diff) |
chore(all): fix lints
Diffstat (limited to 'stockton-input/src')
-rw-r--r-- | stockton-input/src/manager.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/stockton-input/src/manager.rs b/stockton-input/src/manager.rs index 663b6b8..6169f3b 100644 --- a/stockton-input/src/manager.rs +++ b/stockton-input/src/manager.rs @@ -28,17 +28,18 @@ pub enum MouseButton { Left, Right, Middle, - Other(u8) + Other(u8), } impl MouseButton { fn keycode(&self) -> u32 { - u32::MAX - match self { - MouseButton::Left => 0, - MouseButton::Right => 1, - MouseButton::Middle => 2, - MouseButton::Other(x) => *x as u32 - } + u32::MAX + - match self { + MouseButton::Left => 0, + MouseButton::Right => 1, + MouseButton::Middle => 2, + MouseButton::Other(x) => *x as u32, + } } } @@ -48,7 +49,7 @@ pub enum Action { KeyPress(u32), KeyRelease(u32), MousePress(MouseButton), - MouseRelease(MouseButton) + MouseRelease(MouseButton), } impl Action { @@ -58,7 +59,6 @@ impl Action { Action::KeyRelease(x) => *x, Action::MousePress(x) => x.keycode(), Action::MouseRelease(x) => x.keycode(), - } } pub fn is_down(&self) -> bool { |