aboutsummaryrefslogtreecommitdiffstats
path: root/src/document/sync.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/document/sync.rs')
-rw-r--r--src/document/sync.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/document/sync.rs b/src/document/sync.rs
index a7a466b..e9afe06 100644
--- a/src/document/sync.rs
+++ b/src/document/sync.rs
@@ -983,11 +983,11 @@ impl SyncSession {
self.state.their_heads.is_none() && we_ready && peer_ready == Some(false)
}
- /// Whether the message just generated (`generate`) carries changes.
- pub(crate) fn carrying(&self) -> bool {
+ /// The changes the message just generated (`generate`, `push`) carries.
+ pub(crate) fn carried(&self) -> &[crate::document::ChangeHash] {
self.sending
.as_ref()
- .is_some_and(|sending| !sending.sent.is_empty())
+ .map_or(&[], |sending| sending.sent.as_slice())
}
/// Which session this is: a message generated from it reports its send's outcome