From fb92205ecfb5397f4cb3d47baee5da1f063ec892 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Mon, 1 Mar 2021 14:50:31 +0700 Subject: [PATCH] Fix a clippy warning about superfluous match references See: https://rust-lang.github.io/rust-clippy/master/#match_ref_pats --- support/camera.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, -- 2.25.1