mirror of
https://github.com/uutils/coreutils.git
synced 2025-12-23 08:47:37 +00:00
fix(clippy): silent more rules --all-targets --all-features arguments
This commit is contained in:
parent
213389c8ec
commit
7b700ccae2
6 changed files with 12 additions and 15 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue