aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/peer/forget.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-29 03:25:51 +0000
committertv <tv@krebsco.de>2026-11-29 03:25:51 +0000
commit7410954e730a21736b623d9a53f66d646dccff2e (patch)
tree609c03a9bb11b88bfef10886f2e4103d0d596b62 /src/swarm/peer/forget.rs
parente63d30c2581033a85489b10c3f5b252fdbb5049e (diff)
swarm: the member registry is read of any view, not of an Automerge document
Diffstat (limited to 'src/swarm/peer/forget.rs')
-rw-r--r--src/swarm/peer/forget.rs5
1 files changed, 2 insertions, 3 deletions
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<String> {
@@ -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<String> {
+fn forgotten_peers(doc: &(impl Read + ?Sized)) -> Vec<String> {
view::keys_at(doc, &forgotten_dir())
.ok()
.flatten()