From 70beae3b936ee445659e471f40e59ffaa1e1a3d7 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 31 Oct 2026 18:07:07 +0100 Subject: move all automerge references to document --- src/swarm/relay.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/swarm/relay.rs') diff --git a/src/swarm/relay.rs b/src/swarm/relay.rs index c28c9f1..d11c3e0 100644 --- a/src/swarm/relay.rs +++ b/src/swarm/relay.rs @@ -130,16 +130,9 @@ pub(crate) async fn pull_if_behind( } // Those of the listed heads we lack. With a digest only a sample is listed; if we // have all of it, a later keepalive lists others. - let missing: Vec<_> = { - // Document's lookups take &mut self. + let missing = { let mut replica = state.doc.write().await; - remote - .heads - .listed() - .iter() - .filter(|head| replica.doc.get_change_by_hash(head).is_none()) - .copied() - .collect() + crate::document::changes::missing(&mut replica.doc, remote.heads.listed()) }; if missing.is_empty() { return false; -- cgit v1.3.1