Skip to content

Commit

Permalink
Fix obvious clippy warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcampbell24 committed Sep 19, 2024
1 parent f75d688 commit 55a3064
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/uu/runcon/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ impl Display for RunconError {
impl UError for Error {
fn code(&self) -> i32 {
match self {
Error::MissingCommand => error_exit_status::ANOTHER_ERROR,
Error::SELinuxNotEnabled => error_exit_status::ANOTHER_ERROR,
Error::NotUTF8(_) => error_exit_status::ANOTHER_ERROR,
Error::CommandLine(e) => e.exit_code(),
Error::SELinux { .. } => error_exit_status::ANOTHER_ERROR,
Error::Io { .. } => error_exit_status::ANOTHER_ERROR,
Error::Io1 { .. } => error_exit_status::ANOTHER_ERROR,
Self::MissingCommand => error_exit_status::ANOTHER_ERROR,
Self::SELinuxNotEnabled => error_exit_status::ANOTHER_ERROR,
Self::NotUTF8(_) => error_exit_status::ANOTHER_ERROR,
Self::CommandLine(e) => e.exit_code(),
Self::SELinux { .. } => error_exit_status::ANOTHER_ERROR,
Self::Io { .. } => error_exit_status::ANOTHER_ERROR,
Self::Io1 { .. } => error_exit_status::ANOTHER_ERROR,

Check warning on line 130 in src/uu/runcon/src/errors.rs

View check run for this annotation

Codecov / codecov/patch

src/uu/runcon/src/errors.rs#L124-L130

Added lines #L124 - L130 were not covered by tests
}
}
}
2 changes: 1 addition & 1 deletion src/uu/runcon/src/runcon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
let options = match parse_command_line(config, args) {
Ok(r) => r,
Err(r) => {
return Err(r.into());
return Err(r);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/uucore/src/lib/features/proc_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ mod tests {
fn test_pid_entry() {
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(),
)
.unwrap();
Expand Down

0 comments on commit 55a3064

Please sign in to comment.