Skip to content

Commit e7c106e

Browse files
committed
chore: fixed formatting errors
1 parent 28d2bc7 commit e7c106e

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/bors/handlers/workflow.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,18 @@ pub(super) async fn handle_workflow_completed(
8080
};
8181

8282
if let Some(running_time) = payload.running_time {
83-
let running_time_as_duration = chrono::Duration::to_std(&running_time).unwrap_or(Duration::from_secs(0));
83+
let running_time_as_duration =
84+
chrono::Duration::to_std(&running_time).unwrap_or(Duration::from_secs(0));
8485
if running_time_as_duration < repo.config.load().min_ci_time {
8586
payload.status = WorkflowStatus::Failure;
8687
tracing::warn!(
87-
"Workflow running time is less than the minimum CI duration: {:?} < {:?}",
88-
payload.running_time,
89-
repo.config.load().min_ci_time
88+
"Workflow running time is less than the minimum CI duration: {:?} < {:?}",
89+
payload.running_time,
90+
repo.config.load().min_ci_time
9091
);
91-
return Err(anyhow::anyhow!("Workflow running time is less than the minimum CI duration"));
92+
return Err(anyhow::anyhow!(
93+
"Workflow running time is less than the minimum CI duration"
94+
));
9295
}
9396
} else {
9497
println!("Running time is not available.");

src/github/webhook.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,9 @@ fn parse_workflow_run_events(body: &[u8]) -> anyhow::Result<Option<BorsEvent>> {
273273
url: payload.workflow_run.html_url.into(),
274274
},
275275
))),
276-
"completed" => {
276+
"completed" => {
277277
let running_time = if let (Some(started_at), Some(completed_at)) = (
278-
Some(payload.workflow_run.created_at),
278+
Some(payload.workflow_run.created_at),
279279
Some(payload.workflow_run.updated_at),
280280
) {
281281
Some(completed_at - started_at)
@@ -295,7 +295,7 @@ fn parse_workflow_run_events(body: &[u8]) -> anyhow::Result<Option<BorsEvent>> {
295295
},
296296
}),
297297
))
298-
},
298+
}
299299
_ => None,
300300
};
301301
Ok(result)

0 commit comments

Comments
 (0)