Fix clippy::collapsible_match, collapse it

This commit is contained in:
ice_iix 2021-06-18 15:23:00 -07:00
parent 53a0bc9fb6
commit 728367c59b
1 changed files with 41 additions and 41 deletions

View File

@ -631,11 +631,12 @@ fn handle_window_event<T>(
use winit::event::*;
match event {
Event::MainEventsCleared => return true,
Event::DeviceEvent { event, .. } => {
if let DeviceEvent::MouseMotion {
Event::DeviceEvent {
event: DeviceEvent::MouseMotion {
delta: (xrel, yrel),
} = event
{
},
..
} => {
let (rx, ry) = if xrel > 1000.0 || yrel > 1000.0 {
// Heuristic for if we were passed an absolute value instead of relative
// Workaround https://github.com/tomaka/glutin/issues/1084 MouseMotion event returns absolute instead of relative values, when running Linux in a VM
@ -679,7 +680,6 @@ fn handle_window_event<T>(
window.set_cursor_visible(true);
}
}
}
Event::WindowEvent { event, .. } => {
match event {