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:
parent
df9c2aefb1
commit
05fc0c432c
239 changed files with 854 additions and 1015 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue