some cleanup from clippy

This commit is contained in:
Florian RICHER 2025-05-30 22:21:34 +02:00
parent b1458785e5
commit 1568223b9d
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
11 changed files with 30 additions and 38 deletions
src/core/input

View file

@ -40,11 +40,8 @@ impl InputManager {
}
pub fn process_device_event(&mut self, event: &DeviceEvent) {
match event {
DeviceEvent::MouseMotion { delta, .. } => {
self.mouse_position_delta += glam::Vec2::new(delta.0 as f32, delta.1 as f32);
}
_ => {}
if let DeviceEvent::MouseMotion { delta, .. } = event {
self.mouse_position_delta += glam::Vec2::new(delta.0 as f32, delta.1 as f32);
}
}
@ -75,7 +72,7 @@ impl InputManager {
MouseScrollDelta::PixelDelta(position) => {
glam::Vec2::new(position.x as f32, position.y as f32)
}
MouseScrollDelta::LineDelta(x, y) => glam::Vec2::new(*x as f32, *y as f32),
MouseScrollDelta::LineDelta(x, y) => glam::Vec2::new(*x, *y),
};
}
_ => {}