From: Bernie Innocenti Date: Mon, 1 Mar 2021 07:50:31 +0000 (+0700) Subject: Fix a clippy warning about superfluous match references X-Git-Url: https://codewiz.org/gitweb?p=mandelwow.git;a=commitdiff_plain;h=fb92205ecfb5397f4cb3d47baee5da1f063ec892 Fix a clippy warning about superfluous match references See: https://rust-lang.github.io/rust-clippy/master/#match_ref_pats --- diff --git a/support/camera.rs b/support/camera.rs index db6c55a..25b1e72 100644 --- a/support/camera.rs +++ b/support/camera.rs @@ -166,7 +166,7 @@ impl CameraState { pub fn process_input(&mut self, event: &WindowEvent) { //println!("camera event={:?}", event); match event { - &WindowEvent::CursorMoved { position, .. } => { + WindowEvent::CursorMoved { position, .. } => { let (x, y) = (position.x as i32, position.y as i32); if self.mouse_x == -1 { // Set initial absolute position. @@ -178,7 +178,7 @@ impl CameraState { self.mouse_x = x; self.mouse_y = y; } - &WindowEvent::KeyboardInput { input, .. } => { + WindowEvent::KeyboardInput { input, .. } => { let pressed = input.state == ElementState::Pressed; let key = match input.virtual_keycode { Some(key) => key,