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

@ -786,9 +786,9 @@ impl Panel for TerminalPanel {
let settings = TerminalSettings::get_global(cx);
match self.position(cx) {
DockPosition::Left | DockPosition::Right => {
self.width.unwrap_or_else(|| settings.default_width)
self.width.unwrap_or(settings.default_width)
}
DockPosition::Bottom => self.height.unwrap_or_else(|| settings.default_height),
DockPosition::Bottom => self.height.unwrap_or(settings.default_height),
}
}
@ -886,9 +886,9 @@ fn retrieve_system_shell() -> Option<String> {
use anyhow::Context;
use util::ResultExt;
return std::env::var("SHELL")
std::env::var("SHELL")
.context("Error finding SHELL in env.")
.log_err();
.log_err()
}
// `alacritty_terminal` uses this as default on Windows. See:
// https://github.com/alacritty/alacritty/blob/0d4ab7bca43213d96ddfe40048fc0f922543c6f8/alacritty_terminal/src/tty/windows/mod.rs#L130