Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy warnings. #6716

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
Loading