Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jupyterkat committed Feb 13, 2024
1 parent be505ce commit f0a729f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/icondiffbot2/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fn read_key(path: &Path) -> Vec<u8> {
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()));

Expand Down
8 changes: 4 additions & 4 deletions crates/icondiffbot2/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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()
Expand All @@ -61,15 +61,15 @@ 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;
}

let output = output.unwrap();
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;
}

Expand Down
2 changes: 1 addition & 1 deletion crates/mapdiffbot2/src/job_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ pub fn do_job(job: Job, blob_client: Azure) -> Result<CheckOutputs> {
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")?;
}
Expand Down
2 changes: 1 addition & 1 deletion crates/mapdiffbot2/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fn read_key(path: PathBuf) -> Vec<u8> {
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()));

Expand Down
8 changes: 4 additions & 4 deletions crates/mapdiffbot2/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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()
Expand All @@ -143,15 +143,15 @@ 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;
}

let output = output.unwrap();
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;
}

Expand Down

0 comments on commit f0a729f

Please sign in to comment.