From 9938327066954f0a04bb5457523b05b2a24a02a5 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Wed, 3 May 2023 22:20:55 +0300 Subject: [PATCH] On Wayland, fix nightly warnings The new analysis suggests that we can remove mut. --- src/platform_impl/linux/wayland/seat/keyboard/mod.rs | 2 +- src/platform_impl/linux/wayland/seat/touch/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform_impl/linux/wayland/seat/keyboard/mod.rs b/src/platform_impl/linux/wayland/seat/keyboard/mod.rs index daede709..e2ac88c2 100644 --- a/src/platform_impl/linux/wayland/seat/keyboard/mod.rs +++ b/src/platform_impl/linux/wayland/seat/keyboard/mod.rs @@ -166,7 +166,7 @@ impl KeyboardHandler for WinitState { modifiers: Modifiers, ) { let modifiers = ModifiersState::from(modifiers); - let mut seat_state = self.seats.get_mut(&keyboard.seat().id()).unwrap(); + let seat_state = self.seats.get_mut(&keyboard.seat().id()).unwrap(); seat_state.modifiers = modifiers; // NOTE: part of the workaround from `fn enter`, see it above. diff --git a/src/platform_impl/linux/wayland/seat/touch/mod.rs b/src/platform_impl/linux/wayland/seat/touch/mod.rs index 502f2e8c..e5b83868 100644 --- a/src/platform_impl/linux/wayland/seat/touch/mod.rs +++ b/src/platform_impl/linux/wayland/seat/touch/mod.rs @@ -103,7 +103,7 @@ impl TouchHandler for WinitState { let seat_state = self.seats.get_mut(&touch.seat().id()).unwrap(); // Remove the touch point. - let mut touch_point = match seat_state.touch_map.get_mut(&id) { + let touch_point = match seat_state.touch_map.get_mut(&id) { Some(touch_point) => touch_point, None => return, };