From c5dbab327734b598f1aa67f524eaec06afbf03e9 Mon Sep 17 00:00:00 2001 From: atlas Date: Fri, 16 Oct 2026 09:42:35 +0200 Subject: [PATCH] dashboard: drop the unused coord parameter of build_tombstone_views The parameter was discarded with a comment claiming kept_state_names takes &self; it is an associated fn with no receiver. Removes the parameter, the false comment and the argument at both callers. --- hive-c0re/src/dashboard/state_snapshot.rs | 2 +- hive-c0re/src/dashboard/tombstones.rs | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/hive-c0re/src/dashboard/state_snapshot.rs b/hive-c0re/src/dashboard/state_snapshot.rs index ac406e44..c9a22235 100644 --- a/hive-c0re/src/dashboard/state_snapshot.rs +++ b/hive-c0re/src/dashboard/state_snapshot.rs @@ -185,7 +185,7 @@ pub(super) async fn api_state( let any_stale = containers.iter().any(|c| c.needs_update); let transient_snapshot = state.coord.transient_snapshot(); let transients = build_transient_views(&containers, &transient_snapshot); - let tombstones = build_tombstone_views(&state.coord, &containers); + let tombstones = build_tombstone_views(&containers); let port_conflicts = build_port_conflicts(&containers); // Banner warnings: host probes (disk) + agent-state (pending logins). diff --git a/hive-c0re/src/dashboard/tombstones.rs b/hive-c0re/src/dashboard/tombstones.rs index 35c3a22c..74caffa4 100644 --- a/hive-c0re/src/dashboard/tombstones.rs +++ b/hive-c0re/src/dashboard/tombstones.rs @@ -48,11 +48,7 @@ pub struct TombstoneView { /// the page says what it actually shows. The real fix is to record the /// destroy rather than infer it from an absence, deferred to the /// swarm-controller / snapshot-storage rework where this changes shape anyway. -pub(super) fn build_tombstone_views( - coord: &Coordinator, - containers: &[ContainerView], -) -> Vec { - let _ = coord; // kept_state_names is a free fn but takes &self by future plan +pub(super) fn build_tombstone_views(containers: &[ContainerView]) -> Vec { let live: std::collections::HashSet<&str> = containers.iter().map(|c| c.name.as_str()).collect(); Coordinator::kept_state_names() @@ -108,7 +104,7 @@ fn dir_size_bytes(root: &Path) -> u64 { /// is tiny. pub(crate) async fn emit_tombstones_snapshot(coord: &Arc) { let containers = coord.containers_snapshot().await; - let tombstones = build_tombstone_views(coord, &containers); + let tombstones = build_tombstone_views(&containers); coord.emit_dashboard_event(crate::dashboard_events::DashboardEvent::TombstonesChanged { seq: coord.next_seq(), tombstones,