chore: Fix several style lints (#17488)

It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-09-06 11:58:39 +02:00 committed by GitHub
parent 93249fc82b
commit e6c1c51b37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
361 changed files with 3530 additions and 3587 deletions

View file

@ -161,13 +161,39 @@ impl Keystroke {
}
fn is_printable_key(key: &str) -> bool {
match key {
"f1" | "f2" | "f3" | "f4" | "f5" | "f6" | "f7" | "f8" | "f9" | "f10" | "f11" | "f12"
| "f13" | "f14" | "f15" | "f16" | "f17" | "f18" | "f19" | "backspace" | "delete"
| "left" | "right" | "up" | "down" | "pageup" | "pagedown" | "insert" | "home" | "end"
| "escape" => false,
_ => true,
}
!matches!(
key,
"f1" | "f2"
| "f3"
| "f4"
| "f5"
| "f6"
| "f7"
| "f8"
| "f9"
| "f10"
| "f11"
| "f12"
| "f13"
| "f14"
| "f15"
| "f16"
| "f17"
| "f18"
| "f19"
| "backspace"
| "delete"
| "left"
| "right"
| "up"
| "down"
| "pageup"
| "pagedown"
| "insert"
| "home"
| "end"
| "escape"
)
}
impl std::fmt::Display for Keystroke {
@ -250,12 +276,12 @@ impl Modifiers {
pub fn secondary(&self) -> bool {
#[cfg(target_os = "macos")]
{
return self.platform;
self.platform
}
#[cfg(not(target_os = "macos"))]
{
return self.control;
self.control
}
}