Skip to content

Make Clippy happy #572

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

Merged
merged 1 commit into from
Jan 27, 2025
Merged
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
8 changes: 4 additions & 4 deletions cargo-afl/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub fn config(args: &Args) -> Result<()> {
.args(["clone", afl_src_dir_str, &*tempdir.path().to_string_lossy()])
.status()
.as_ref()
.map_or(false, ExitStatus::success);
.is_ok_and(ExitStatus::success);
ensure!(success, "could not run 'git'");
} else {
let success = Command::new("cp")
Expand All @@ -68,7 +68,7 @@ pub fn config(args: &Args) -> Result<()> {
])
.status()
.as_ref()
.map_or(false, ExitStatus::success);
.is_ok_and(ExitStatus::success);
ensure!(success, "could not copy directory {afl_src_dir:?}");
}

Expand Down Expand Up @@ -119,7 +119,7 @@ fn build_afl(args: &Args, work_dir: &Path) -> Result<()> {
command.stderr(Stdio::null());
}

let success = command.status().as_ref().map_or(false, ExitStatus::success);
let success = command.status().as_ref().is_ok_and(ExitStatus::success);
ensure!(success, "could not run 'make install'");

Ok(())
Expand All @@ -142,7 +142,7 @@ fn build_afl_llvm_runtime(args: &Args, work_dir: &Path) -> Result<()> {
command.stderr(Stdio::null());
}

let success = command.status().as_ref().map_or(false, ExitStatus::success);
let success = command.status().as_ref().is_ok_and(ExitStatus::success);
ensure!(success, "could not run 'ar'");

Ok(())
Expand Down
Loading