Skip to content

Commit

Permalink
Make Clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Jan 27, 2025
1 parent 769e851 commit 837153a
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 837153a

Please sign in to comment.