aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/peer/forget.rs
diff options
context:
space:
mode:
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()