Skip to content

Commit

Permalink
Use the rust fs::copy method
Browse files Browse the repository at this point in the history
  • Loading branch information
louismerlin committed Dec 5, 2024
1 parent 4e630c9 commit a83bd48
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/bin/cargo-ziggy/fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,7 @@ impl Fuzz {
let hasher = process::Command::new("md5sum").arg(file).output().unwrap();
let hash_vec = hasher.stdout.split(|&b| b == b' ').next().unwrap_or(&[]);
let hash = std::str::from_utf8(hash_vec).unwrap_or_default();
let _ = process::Command::new("cp")
.args([
format!("{}", file.display()),
format!("{}/corpus/{hash}", self.output_target()),
])
.output()
.unwrap();
let _ = fs::copy(file, format!("{}/corpus/{hash}", self.output_target()));
}
}
last_synced_created_time = newest_time;
Expand Down

0 comments on commit a83bd48

Please sign in to comment.