From f0a729fcd4337a6d1253bf59339ce33b9e5c804f Mon Sep 17 00:00:00 2001 From: Katherine Kiefer Date: Tue, 13 Feb 2024 22:53:43 +1100 Subject: [PATCH] clean up --- crates/icondiffbot2/src/main.rs | 2 +- crates/icondiffbot2/src/runner.rs | 8 ++++---- crates/mapdiffbot2/src/job_processor.rs | 2 +- crates/mapdiffbot2/src/main.rs | 2 +- crates/mapdiffbot2/src/runner.rs | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/icondiffbot2/src/main.rs b/crates/icondiffbot2/src/main.rs index 5d34f4d0..db611b94 100644 --- a/crates/icondiffbot2/src/main.rs +++ b/crates/icondiffbot2/src/main.rs @@ -120,7 +120,7 @@ fn read_key(path: &Path) -> Vec { File::open(path).unwrap_or_else(|_| panic!("Unable to find file {}", path.display())); let mut key = Vec::new(); - let _ = key_file + _ = key_file .read_to_end(&mut key) .unwrap_or_else(|_| panic!("Failed to read key {}", path.display())); diff --git a/crates/icondiffbot2/src/runner.rs b/crates/icondiffbot2/src/runner.rs index 37213a6c..e98cba37 100644 --- a/crates/icondiffbot2/src/runner.rs +++ b/crates/icondiffbot2/src/runner.rs @@ -30,7 +30,7 @@ async fn job_handler(name: &str, job: Job, client: reqwest::Client) { check_run.id() ); - let _ = check_run.mark_started().await; + _ = check_run.mark_started().await; let output = actix_web::rt::time::timeout( Duration::from_secs(7200), @@ -47,7 +47,7 @@ async fn job_handler(name: &str, job: Job, client: reqwest::Client) { let output = { if output.is_err() { tracing::error!("Job timed out!"); - let _ = check_run.mark_failed("Job timed out after 1 hours!").await; + _ = check_run.mark_failed("Job timed out after 1 hours!").await; return; } output.unwrap() @@ -61,7 +61,7 @@ async fn job_handler(name: &str, job: Job, client: reqwest::Client) { Err(e) => e.to_string(), }; tracing::error!("Join Handle error: {fuckup}"); - let _ = check_run.mark_failed(&fuckup).await; + _ = check_run.mark_failed(&fuckup).await; return; } @@ -69,7 +69,7 @@ async fn job_handler(name: &str, job: Job, client: reqwest::Client) { if let Err(e) = output { let fuckup = format!("{e:?}"); tracing::error!("Other rendering error: {fuckup}"); - let _ = check_run.mark_failed(&fuckup).await; + _ = check_run.mark_failed(&fuckup).await; return; } diff --git a/crates/mapdiffbot2/src/job_processor.rs b/crates/mapdiffbot2/src/job_processor.rs index 414f0f23..725fc7ac 100644 --- a/crates/mapdiffbot2/src/job_processor.rs +++ b/crates/mapdiffbot2/src/job_processor.rs @@ -382,7 +382,7 @@ pub fn do_job(job: Job, blob_client: Azure) -> Result { summary: "The repository is being cloned, this will take a few minutes. Future runs will not require cloning.".to_owned(), text: "".to_owned(), }; - let _ = job.check_run.set_output(output).await; // we don't really care if updating the job fails, just continue + _ = job.check_run.set_output(output).await; // we don't really care if updating the job fails, just continue }); clone_repo(&url, &repo_dir).wrap_err("Cloning repo")?; } diff --git a/crates/mapdiffbot2/src/main.rs b/crates/mapdiffbot2/src/main.rs index 4cd0dea6..21919fea 100644 --- a/crates/mapdiffbot2/src/main.rs +++ b/crates/mapdiffbot2/src/main.rs @@ -96,7 +96,7 @@ fn read_key(path: PathBuf) -> Vec { File::open(&path).unwrap_or_else(|_| panic!("Unable to find file {}", path.display())); let mut key = Vec::new(); - let _ = key_file + _ = key_file .read_to_end(&mut key) .unwrap_or_else(|_| panic!("Failed to read key {}", path.display())); diff --git a/crates/mapdiffbot2/src/runner.rs b/crates/mapdiffbot2/src/runner.rs index 35770eb7..f998ec3e 100644 --- a/crates/mapdiffbot2/src/runner.rs +++ b/crates/mapdiffbot2/src/runner.rs @@ -112,7 +112,7 @@ async fn job_handler(name: &str, job: Job, blob_client: Azure) { check_run.id() ); - let _ = check_run.mark_started().await; + _ = check_run.mark_started().await; let output = actix_web::rt::time::timeout( Duration::from_secs(7200), @@ -129,7 +129,7 @@ async fn job_handler(name: &str, job: Job, blob_client: Azure) { let output = { if output.is_err() { tracing::error!("Job timed out!"); - let _ = check_run.mark_failed("Job timed out after 1 hours!").await; + _ = check_run.mark_failed("Job timed out after 1 hours!").await; return; } output.unwrap() @@ -143,7 +143,7 @@ async fn job_handler(name: &str, job: Job, blob_client: Azure) { Err(e) => e.to_string(), }; tracing::error!("Join Handle error: {fuckup}"); - let _ = check_run.mark_failed(&fuckup).await; + _ = check_run.mark_failed(&fuckup).await; return; } @@ -151,7 +151,7 @@ async fn job_handler(name: &str, job: Job, blob_client: Azure) { if let Err(e) = output { let fuckup = format!("{e:?}"); tracing::error!("Other rendering error: {fuckup}"); - let _ = check_run.mark_failed(&fuckup).await; + _ = check_run.mark_failed(&fuckup).await; return; }