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

@ -11,14 +11,14 @@ use gpui::{px, Modifiers, MouseButton, MouseMoveEvent, Pixels, Point, ScrollWhee
use crate::TerminalSize;
enum MouseFormat {
SGR,
Sgr,
Normal(bool),
}
impl MouseFormat {
fn from_mode(mode: TermMode) -> Self {
if mode.contains(TermMode::SGR_MOUSE) {
MouseFormat::SGR
MouseFormat::Sgr
} else if mode.contains(TermMode::UTF8_MOUSE) {
MouseFormat::Normal(true)
} else {
@ -77,10 +77,7 @@ impl AlacMouseButton {
}
fn is_other(&self) -> bool {
match self {
AlacMouseButton::Other => true,
_ => false,
}
matches!(self, AlacMouseButton::Other)
}
}
@ -219,7 +216,7 @@ fn mouse_report(
}
match format {
MouseFormat::SGR => {
MouseFormat::Sgr => {
Some(sgr_mouse_report(point, button as u8 + mods, pressed).into_bytes())
}
MouseFormat::Normal(utf8) => {