Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-valerio committed Jun 20, 2024
1 parent 7326c2d commit 44be82e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
5 changes: 1 addition & 4 deletions src/bin/cargo-ziggy/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ impl Build {
if !self.no_honggfuzz {
eprintln!(" {} honggfuzz", style("Building").red().bold());

let mut hfuzz_args = vec![
"hfuzz",
"build",
];
let mut hfuzz_args = vec!["hfuzz", "build"];

// Add the --release argument if self.release is true
if self.release {
Expand Down
18 changes: 9 additions & 9 deletions src/bin/cargo-ziggy/fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl Fuzz {
}

pub fn corpus_minimized(&self) -> String {
format!("{}/corpus_minimized/", self.output_target(), )
format!("{}/corpus_minimized/", self.output_target(),)
}

pub fn output_target(&self) -> String {
Expand Down Expand Up @@ -173,7 +173,7 @@ impl Fuzz {
self.output_target(),
self.target
)
.into()]);
.into()]);

for crash_dir in crash_dirs {
if let Ok(crashes) = fs::read_dir(crash_dir) {
Expand All @@ -182,7 +182,7 @@ impl Fuzz {
let to_path = crash_path.join(&file_name);
if to_path.exists()
|| ["", "README.txt", "HONGGFUZZ.REPORT.TXT", "input"]
.contains(&file_name.to_str().unwrap_or_default())
.contains(&file_name.to_str().unwrap_or_default())
{
continue;
}
Expand All @@ -199,7 +199,7 @@ impl Fuzz {
"{}/afl/mainaflfuzzer/queue/*",
self.output_target(),
))?
.flatten();
.flatten();
for file in afl_corpus {
if let Some((file_id, file_name)) = extract_file_id(&file) {
if file_id > last_synced_queue_id {
Expand Down Expand Up @@ -363,8 +363,8 @@ impl Fuzz {
&timeout_option_afl,
&dictionary_option,
]
.iter()
.filter(|a| a != &&""),
.iter()
.filter(|a| a != &&""),
)
.args(self.afl_flags.clone())
.arg(format!("./target/afl/debug/{}", self.target))
Expand Down Expand Up @@ -405,8 +405,8 @@ impl Fuzz {
.unwrap_or_default()
.contains("dynamic_input")
&& !std::str::from_utf8(hfuzz_help.stderr.as_slice())
.unwrap_or_default()
.contains("dynamic_input")
.unwrap_or_default()
.contains("dynamic_input")
{
return Err(anyhow!("Outdated version of honggfuzz, please update the ziggy version in your Cargo.toml or rebuild the project"));
}
Expand Down Expand Up @@ -484,7 +484,7 @@ impl Fuzz {
"tail -f {}/logs/honggfuzz.log",
self.output_target()
))
.bold()
.bold()
);
}

Expand Down

0 comments on commit 44be82e

Please sign in to comment.