From 767b1c878532924775d5be7307e5aec10872e443 Mon Sep 17 00:00:00 2001 From: tcmal Date: Sun, 25 Aug 2024 17:44:22 +0100 Subject: chore(all): fix lints --- stockton-input/src/manager.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'stockton-input/src') 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 { -- cgit v1.2.3