From 7410954e730a21736b623d9a53f66d646dccff2e Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 29 Nov 2026 03:25:51 +0000 Subject: swarm: the member registry is read of any view, not of an Automerge document --- src/swarm/peer/forget.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/swarm/peer/forget.rs') diff --git a/src/swarm/peer/forget.rs b/src/swarm/peer/forget.rs index 8616ae9..b911993 100644 --- a/src/swarm/peer/forget.rs +++ b/src/swarm/peer/forget.rs @@ -9,10 +9,9 @@ use serde_json::Value as JsonValue; use tokio::time::Instant; use tracing::{info, warn}; -use crate::document::Document; use crate::document::meta; use crate::document::store::StoreError; -use crate::document::view; +use crate::document::view::{self, Read}; use crate::state::{AppState, Standing}; fn forgotten_dir() -> Vec { @@ -32,7 +31,7 @@ pub(crate) fn affects_forget_records(path: &[String]) -> bool { path.starts_with(&dir) || dir.starts_with(path) } -fn forgotten_peers(doc: &Document) -> Vec { +fn forgotten_peers(doc: &(impl Read + ?Sized)) -> Vec { view::keys_at(doc, &forgotten_dir()) .ok() .flatten() -- cgit v1.3.1