Another batch of lint fixes (#36521)

- **Enable a bunch of extra lints**
- **First batch of fixes**
- **More fixes**

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-08-19 22:33:44 +02:00 committed by GitHub
parent 69b1c6d6f5
commit 6825715503
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
147 changed files with 788 additions and 1042 deletions

View file

@ -494,11 +494,11 @@ mod linux {
Ok(Fork::Parent(_)) => Ok(()),
Ok(Fork::Child) => {
unsafe { std::env::set_var(FORCE_CLI_MODE_ENV_VAR_NAME, "") };
if let Err(_) = fork::setsid() {
if fork::setsid().is_err() {
eprintln!("failed to setsid: {}", std::io::Error::last_os_error());
process::exit(1);
}
if let Err(_) = fork::close_fd() {
if fork::close_fd().is_err() {
eprintln!("failed to close_fd: {}", std::io::Error::last_os_error());
}
let error =
@ -534,8 +534,8 @@ mod flatpak {
use std::process::Command;
use std::{env, process};
const EXTRA_LIB_ENV_NAME: &'static str = "ZED_FLATPAK_LIB_PATH";
const NO_ESCAPE_ENV_NAME: &'static str = "ZED_FLATPAK_NO_ESCAPE";
const EXTRA_LIB_ENV_NAME: &str = "ZED_FLATPAK_LIB_PATH";
const NO_ESCAPE_ENV_NAME: &str = "ZED_FLATPAK_NO_ESCAPE";
/// Adds bundled libraries to LD_LIBRARY_PATH if running under flatpak
pub fn ld_extra_libs() {