diff options
| author | tv <tv@krebsco.de> | 2026-10-31 18:07:07 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-31 18:07:07 +0100 |
| commit | 70beae3b936ee445659e471f40e59ffaa1e1a3d7 (patch) | |
| tree | 91e24e4c7cf2c739c2cec0f8a6190362d66a45f0 /src/swarm/relay.rs | |
| parent | 37815998b9d37a45f440864f6d3149c3ce9e69f1 (diff) | |
move all automerge references to document
Diffstat (limited to 'src/swarm/relay.rs')
| -rw-r--r-- | src/swarm/relay.rs | 11 |
1 files changed, 2 insertions, 9 deletions
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; |
