fix(clippy): silent more rules --all-targets --all-features arguments

This commit is contained in:
Gabriele Belluardo 2025-06-17 11:02:25 +02:00
parent 213389c8ec
commit 7b700ccae2
No known key found for this signature in database
GPG key ID: 21671B8C89CCBF4F
6 changed files with 12 additions and 15 deletions

View file

@ -95,12 +95,12 @@ fn parse_group_list(list_str: &str) -> Result<Vec<String>, ChrootError> {
if name.is_empty() {
// --groups=","
continue;
} else {
// --groups=", "
// chroot: invalid group ' '
show!(ChrootError::InvalidGroup(name.to_string()));
err = true;
}
// --groups=", "
// chroot: invalid group ' '
show!(ChrootError::InvalidGroup(name.to_string()));
err = true;
} else {
// TODO Figure out a better condition here.
if trimmed_name.starts_with(char::is_numeric)

View file

@ -2664,9 +2664,8 @@ fn handle_no_preserve_mode(options: &Options, org_mode: u32) -> u32 {
const S_IRWXUGO: u32 = (S_IRWXU | S_IRWXG | S_IRWXO) as u32;
if is_explicit_no_preserve_mode {
return MODE_RW_UGO;
} else {
return org_mode & S_IRWXUGO;
};
}
return org_mode & S_IRWXUGO;
}
}

View file

@ -217,9 +217,9 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
set_exit_code(1);
if i + 1 >= users.len() {
break;
} else {
continue;
}
continue;
}
}
} else {

View file

@ -916,9 +916,8 @@ fn string_to_control_char(s: &str) -> Result<u8, ControlCharMappingError> {
if let Some(val) = ascii_num {
if val > 255 {
return Err(ControlCharMappingError::IntOutOfRange(s.to_string()));
} else {
return Ok(val as u8);
}
return Ok(val as u8);
}
// try to parse ^<char> or just <char>
let mut chars = s.chars();

View file

@ -143,9 +143,8 @@ mod platform {
get_message("sync-error-find-next-volume"),
)),
};
} else {
volumes.push(String::from_wide_null(&name));
}
volumes.push(String::from_wide_null(&name));
}
}

View file

@ -242,7 +242,7 @@ fn process_utmpx(file: Option<&OsString>) -> (Option<time_t>, usize) {
boot_time = Some(dt.unix_timestamp() as time_t);
}
}
_ => continue,
_ => (),
}
}
(boot_time, nusers)