Run cargo fmt
This commit is contained in:
parent
de2992ff63
commit
064f5d11ec
3 changed files with 18 additions and 6 deletions
|
|
@ -175,7 +175,9 @@ async fn update_refs(conn: &mut SqliteConnection, refs: Vec<Reference>) -> someh
|
|||
// Add new refs and update existing refs
|
||||
for reference in refs {
|
||||
let name = reference.name.to_string();
|
||||
let Some(hash) = reference.peeled else { continue; };
|
||||
let Some(hash) = reference.peeled else {
|
||||
continue;
|
||||
};
|
||||
let hash = hash.to_string();
|
||||
|
||||
sqlx::query!(
|
||||
|
|
@ -195,7 +197,9 @@ async fn update_refs(conn: &mut SqliteConnection, refs: Vec<Reference>) -> someh
|
|||
}
|
||||
|
||||
async fn track_main_branch(conn: &mut SqliteConnection, repo: &Repository) -> somehow::Result<()> {
|
||||
let Some(head) = repo.head_ref()? else { return Ok(()); };
|
||||
let Some(head) = repo.head_ref()? else {
|
||||
return Ok(());
|
||||
};
|
||||
let name = head.inner.name.to_string();
|
||||
sqlx::query!("UPDATE refs SET tracked = true WHERE name = ?", name)
|
||||
.execute(conn)
|
||||
|
|
|
|||
|
|
@ -103,8 +103,12 @@ impl Workers {
|
|||
|
||||
pub fn should_abort_work(&self, name: &str, queue: &[String]) -> bool {
|
||||
// A worker should abort work if...
|
||||
let Some(info) = self.workers.get(name) else { return false; };
|
||||
let WorkerStatus::Working (run) = &info.status else { return false; };
|
||||
let Some(info) = self.workers.get(name) else {
|
||||
return false;
|
||||
};
|
||||
let WorkerStatus::Working(run) = &info.status else {
|
||||
return false;
|
||||
};
|
||||
|
||||
// The commit isn't in the queue
|
||||
if !queue.contains(&run.hash) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue