From d2a0493092f08359ee0ad9c16c8afdee5d769ca3 Mon Sep 17 00:00:00 2001 From: damocles Date: Wed, 1 Jul 2026 18:58:09 +0200 Subject: [PATCH] =?UTF-8?q?address=20mara:=20drop=20clippy=20allow=20on=20?= =?UTF-8?q?run=5Fgraceful=5Fstop=20=E2=80=94=20return=20()=20since=20the?= =?UTF-8?q?=20body=20is=20infallible,=20wrap=20the=20dispatch=20arm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hive-c0re/src/rebuild_queue.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/hive-c0re/src/rebuild_queue.rs b/hive-c0re/src/rebuild_queue.rs index deddb90e..957ebbc7 100644 --- a/hive-c0re/src/rebuild_queue.rs +++ b/hive-c0re/src/rebuild_queue.rs @@ -1006,7 +1006,10 @@ async fn dispatch( 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 } - (QueueKind::GracefulStop, _) => run_graceful_stop(coord, entry), + (QueueKind::GracefulStop, _) => { + run_graceful_stop(coord, entry); + Ok(()) + } (QueueKind::Start, _) => run_start(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`. /// 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. -// Returns `Result` for symmetry with the other `run_*` dispatch arms even -// 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, - entry: &QueueEntry, -) -> anyhow::Result<()> { +fn run_graceful_stop(coord: &std::sync::Arc, entry: &QueueEntry) { let name = entry.agent.clone(); let parent_id = entry.id; let source = entry.source; @@ -1113,7 +1109,6 @@ fn run_graceful_stop( }); coord.emit_rebuild_queue_snapshot(); }); - Ok(()) } /// Run one `MetaUpdate` entry: bump the meta flake's locks for the