mirror of
https://github.com/uutils/coreutils
synced 2024-11-10 07:04:16 +00:00
Fix obvious clippy warnings.
This commit is contained in:
parent
f75d688b6c
commit
55a3064fa7
3 changed files with 9 additions and 9 deletions
|
@ -121,13 +121,13 @@ impl Display for RunconError {
|
||||||
impl UError for Error {
|
impl UError for Error {
|
||||||
fn code(&self) -> i32 {
|
fn code(&self) -> i32 {
|
||||||
match self {
|
match self {
|
||||||
Error::MissingCommand => error_exit_status::ANOTHER_ERROR,
|
Self::MissingCommand => error_exit_status::ANOTHER_ERROR,
|
||||||
Error::SELinuxNotEnabled => error_exit_status::ANOTHER_ERROR,
|
Self::SELinuxNotEnabled => error_exit_status::ANOTHER_ERROR,
|
||||||
Error::NotUTF8(_) => error_exit_status::ANOTHER_ERROR,
|
Self::NotUTF8(_) => error_exit_status::ANOTHER_ERROR,
|
||||||
Error::CommandLine(e) => e.exit_code(),
|
Self::CommandLine(e) => e.exit_code(),
|
||||||
Error::SELinux { .. } => error_exit_status::ANOTHER_ERROR,
|
Self::SELinux { .. } => error_exit_status::ANOTHER_ERROR,
|
||||||
Error::Io { .. } => error_exit_status::ANOTHER_ERROR,
|
Self::Io { .. } => error_exit_status::ANOTHER_ERROR,
|
||||||
Error::Io1 { .. } => error_exit_status::ANOTHER_ERROR,
|
Self::Io1 { .. } => error_exit_status::ANOTHER_ERROR,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
let options = match parse_command_line(config, args) {
|
let options = match parse_command_line(config, args) {
|
||||||
Ok(r) => r,
|
Ok(r) => r,
|
||||||
Err(r) => {
|
Err(r) => {
|
||||||
return Err(r.into());
|
return Err(r);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -370,7 +370,7 @@ mod tests {
|
||||||
fn test_pid_entry() {
|
fn test_pid_entry() {
|
||||||
let current_pid = current_pid();
|
let current_pid = current_pid();
|
||||||
|
|
||||||
let mut pid_entry = ProcessInformation::try_new(
|
let pid_entry = ProcessInformation::try_new(
|
||||||
PathBuf::from_str(&format!("/proc/{}", current_pid)).unwrap(),
|
PathBuf::from_str(&format!("/proc/{}", current_pid)).unwrap(),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
Loading…
Reference in a new issue