some cleanup from clippy
This commit is contained in:
parent
b1458785e5
commit
1568223b9d
11 changed files with 30 additions and 38 deletions
src/core/input
|
@ -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),
|
||||
};
|
||||
}
|
||||
_ => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue