Fix clippy issues on stable

This commit is contained in:
Kirill Chibisov 2023-01-27 07:18:58 +03:00 committed by GitHub
parent e1b7fda409
commit 930df0ec45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 68 additions and 76 deletions

View file

@ -62,7 +62,7 @@ fn main() {
},
..
} => {
window.set_title(&format!("{:?}", key));
window.set_title(&format!("{key:?}"));
let state = !modifiers.shift();
use VirtualKeyCode::*;
match key {
@ -92,17 +92,17 @@ fn main() {
}),
L if state => {
if let Err(err) = window.set_cursor_grab(CursorGrabMode::Locked) {
println!("error: {}", err);
println!("error: {err}");
}
}
G if state => {
if let Err(err) = window.set_cursor_grab(CursorGrabMode::Confined) {
println!("error: {}", err);
println!("error: {err}");
}
}
G | L if !state => {
if let Err(err) = window.set_cursor_grab(CursorGrabMode::None) {
println!("error: {}", err);
println!("error: {err}");
}
}
H => window.set_cursor_visible(!state),