Skip to content

Commit a153d98

Browse files
committed
cargo fmt fixes
1 parent 212a0c4 commit a153d98

5 files changed

Lines changed: 35 additions & 9 deletions

File tree

fuzzor-cmds/src/bin/fuzz-project.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ struct Options {
8484
repo: Option<String>,
8585
#[arg(long = "branch", help = "Overwrite the branch from the config")]
8686
branch: Option<String>,
87-
#[arg(long = "pr", help = "PR number to fuzz (fetches from the upstream repo)")]
87+
#[arg(
88+
long = "pr",
89+
help = "PR number to fuzz (fetches from the upstream repo)"
90+
)]
8891
pr: Option<String>,
8992
#[arg(long = "name", help = "Overwrite the name from the config")]
9093
name: Option<String>,

fuzzor-docker/src/env.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,12 @@ impl Environment for DockerEnv {
439439

440440
if let Some(entry) = tarball
441441
.entries()
442-
.map_err(|e| format!("Could not get entries from covered functions tarball: {}", e))?
442+
.map_err(|e| {
443+
format!(
444+
"Could not get entries from covered functions tarball: {}",
445+
e
446+
)
447+
})?
443448
.next()
444449
{
445450
let mut contents = String::new();

fuzzor/src/project/harness.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ impl HarnessState for PersistentHarnessState {
210210

211211
let summary_path = campaign_dir.join("coverage-summary.json");
212212
if let Err(err) = tokio::fs::write(&summary_path, &summary).await {
213-
log::error!("Could not write coverage summary to {:?}: {:?}", summary_path, err);
213+
log::error!(
214+
"Could not write coverage summary to {:?}: {:?}",
215+
summary_path,
216+
err
217+
);
214218
}
215219
}
216220

@@ -297,7 +301,10 @@ mod tests {
297301
.join("campaigns")
298302
.join("campaign-001")
299303
.join("startup_params.json");
300-
assert!(params_path.exists(), "startup_params.json should be created");
304+
assert!(
305+
params_path.exists(),
306+
"startup_params.json should be created"
307+
);
301308

302309
let content = tokio::fs::read_to_string(&params_path).await.unwrap();
303310
let loaded: CampaignStartupParams = serde_json::from_str(&content).unwrap();

fuzzor/src/project/mod.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,15 @@ where
590590
// Run the campaign in a separate task.
591591
let project_config = self.project_config.clone();
592592
let campaign_task = tokio::spawn(async move {
593-
let mut campaign =
594-
Campaign::new(project_config, harness, env, event_sender, commit_hash, duration)
595-
.await;
593+
let mut campaign = Campaign::new(
594+
project_config,
595+
harness,
596+
env,
597+
event_sender,
598+
commit_hash,
599+
duration,
600+
)
601+
.await;
596602
campaign.run(quit_rx).await;
597603
campaign
598604
});

infra/ensemble-fuzz/src/fuzzer/aflpp.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ impl AflppFuzzer {
5757
}
5858

5959
fn stderr_log_path(&self) -> PathBuf {
60-
self.workspace.join(format!("aflpp_instance_{}.log", self.id))
60+
self.workspace
61+
.join(format!("aflpp_instance_{}.log", self.id))
6162
}
6263

6364
fn queue_seed_count(&self) -> Option<u64> {
@@ -254,7 +255,11 @@ impl Fuzzer for AflppFuzzer {
254255
let log_path = self.stderr_log_path();
255256
let log_file = std::fs::File::create(&log_path).expect("Could not create AFL++ log file");
256257
if std::env::var("FUZZOR_AFL_DEBUG").is_ok() {
257-
log::info!("AFL++ instance {} stderr is logged to {:?}", self.id, log_path);
258+
log::info!(
259+
"AFL++ instance {} stderr is logged to {:?}",
260+
self.id,
261+
log_path
262+
);
258263
}
259264
command.stderr(Stdio::from(log_file));
260265

0 commit comments

Comments
 (0)