mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-02 06:40:06 -04:00
On Wayland, fix nightly warnings
The new analysis suggests that we can remove mut.
This commit is contained in:
@@ -166,7 +166,7 @@ impl KeyboardHandler for WinitState {
|
|||||||
modifiers: Modifiers,
|
modifiers: Modifiers,
|
||||||
) {
|
) {
|
||||||
let modifiers = ModifiersState::from(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;
|
seat_state.modifiers = modifiers;
|
||||||
|
|
||||||
// NOTE: part of the workaround from `fn enter`, see it above.
|
// NOTE: part of the workaround from `fn enter`, see it above.
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ impl TouchHandler for WinitState {
|
|||||||
let seat_state = self.seats.get_mut(&touch.seat().id()).unwrap();
|
let seat_state = self.seats.get_mut(&touch.seat().id()).unwrap();
|
||||||
|
|
||||||
// Remove the touch point.
|
// 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,
|
Some(touch_point) => touch_point,
|
||||||
None => return,
|
None => return,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user