address mara: drop clippy allow on run_graceful_stop — return () since the body is infallible, wrap the dispatch arm
This commit is contained in:
parent
c7bac398b2
commit
d2a0493092
1 changed files with 5 additions and 10 deletions
|
|
@ -1006,7 +1006,10 @@ async fn dispatch(
|
||||||
crate::auto_update::current_flake_rev(&coord.hyperhive_flake).unwrap_or_default();
|
crate::auto_update::current_flake_rev(&coord.hyperhive_flake).unwrap_or_default();
|
||||||
crate::auto_update::rebuild_agent(coord, name, ¤t_rev, Some(entry.id), true).await
|
crate::auto_update::rebuild_agent(coord, name, ¤t_rev, Some(entry.id), true).await
|
||||||
}
|
}
|
||||||
(QueueKind::GracefulStop, _) => run_graceful_stop(coord, entry),
|
(QueueKind::GracefulStop, _) => {
|
||||||
|
run_graceful_stop(coord, entry);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
(QueueKind::Start, _) => run_start(coord, entry).await,
|
(QueueKind::Start, _) => run_start(coord, entry).await,
|
||||||
(QueueKind::Stop, _) => run_stop(coord, entry).await,
|
(QueueKind::Stop, _) => run_stop(coord, entry).await,
|
||||||
}
|
}
|
||||||
|
|
@ -1060,14 +1063,7 @@ async fn run_stop(
|
||||||
/// then enqueues a fast-lane `Stop` for the actual `nixos-container stop`.
|
/// then enqueues a fast-lane `Stop` for the actual `nixos-container stop`.
|
||||||
/// Routing the real stop through the fast lane means the container stops
|
/// Routing the real stop through the fast lane means the container stops
|
||||||
/// serialise there (one stop at a time) while the drains ran in parallel.
|
/// serialise there (one stop at a time) while the drains ran in parallel.
|
||||||
// Returns `Result` for symmetry with the other `run_*` dispatch arms even
|
fn run_graceful_stop(coord: &std::sync::Arc<crate::coordinator::Coordinator>, entry: &QueueEntry) {
|
||||||
// though the fallible drain now lives in the detached watcher and this body
|
|
||||||
// is infallible.
|
|
||||||
#[allow(clippy::unnecessary_wraps)]
|
|
||||||
fn run_graceful_stop(
|
|
||||||
coord: &std::sync::Arc<crate::coordinator::Coordinator>,
|
|
||||||
entry: &QueueEntry,
|
|
||||||
) -> anyhow::Result<()> {
|
|
||||||
let name = entry.agent.clone();
|
let name = entry.agent.clone();
|
||||||
let parent_id = entry.id;
|
let parent_id = entry.id;
|
||||||
let source = entry.source;
|
let source = entry.source;
|
||||||
|
|
@ -1113,7 +1109,6 @@ fn run_graceful_stop(
|
||||||
});
|
});
|
||||||
coord.emit_rebuild_queue_snapshot();
|
coord.emit_rebuild_queue_snapshot();
|
||||||
});
|
});
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Run one `MetaUpdate` entry: bump the meta flake's locks for the
|
/// Run one `MetaUpdate` entry: bump the meta flake's locks for the
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue