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.
This commit is contained in:
parent
f70bbda7d7
commit
c5dbab3277
2 changed files with 3 additions and 7 deletions
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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<TombstoneView> {
|
||||
let _ = coord; // kept_state_names is a free fn but takes &self by future plan
|
||||
pub(super) fn build_tombstone_views(containers: &[ContainerView]) -> Vec<TombstoneView> {
|
||||
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<Coordinator>) {
|
||||
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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue