Fix a bunch of other low-hanging style lints (#36498)

- **Fix a bunch of low hanging style lints like unnecessary-return**
- **Fix single worktree violation**
- **And the rest**

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-08-19 21:26:17 +02:00 committed by GitHub
parent df9c2aefb1
commit 05fc0c432c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
239 changed files with 854 additions and 1015 deletions

View file

@ -363,7 +363,7 @@ fn anonymous_fd(path: &str) -> Option<fs::File> {
let fd: fd::RawFd = fd_str.parse().ok()?;
let file = unsafe { fs::File::from_raw_fd(fd) };
return Some(file);
Some(file)
}
#[cfg(any(target_os = "macos", target_os = "freebsd"))]
{
@ -381,13 +381,13 @@ fn anonymous_fd(path: &str) -> Option<fs::File> {
}
let fd: fd::RawFd = fd_str.parse().ok()?;
let file = unsafe { fs::File::from_raw_fd(fd) };
return Some(file);
Some(file)
}
#[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "freebsd")))]
{
_ = path;
// not implemented for bsd, windows. Could be, but isn't yet
return None;
None
}
}
@ -586,7 +586,7 @@ mod flatpak {
pub fn set_bin_if_no_escape(mut args: super::Args) -> super::Args {
if env::var(NO_ESCAPE_ENV_NAME).is_ok()
&& env::var("FLATPAK_ID").map_or(false, |id| id.starts_with("dev.zed.Zed"))
&& env::var("FLATPAK_ID").is_ok_and(|id| id.starts_with("dev.zed.Zed"))
&& args.zed.is_none()
{
args.zed = Some("/app/libexec/zed-editor".into());