aboutsummaryrefslogtreecommitdiffstats
path: root/src/document/store.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-01 22:31:49 +0100
committertv <tv@krebsco.de>2026-11-01 22:31:49 +0100
commit3adacb1818816da62f636a29f5d88103eca633e2 (patch)
tree569b0ca89970e79ec2584d8d0e6f23e0d64c6ac6 /src/document/store.rs
parentb5d29103f19db42fb2f813f551e0ada68bc1c782 (diff)
document: introduce patch log
Diffstat (limited to 'src/document/store.rs')
-rw-r--r--src/document/store.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/document/store.rs b/src/document/store.rs
index 13824b9..4d9bc74 100644
--- a/src/document/store.rs
+++ b/src/document/store.rs
@@ -42,7 +42,12 @@ pub(crate) fn changed(
after: &[automerge::ChangeHash],
lists: InLists,
) -> Vec<Changed> {
- doc.diff(before, after)
+ changed_in(&doc.diff(before, after), lists)
+}
+
+/// The store paths `patches` touched, as [`changed`] has them.
+pub(crate) fn changed_in(patches: &[automerge::Patch], lists: InLists) -> Vec<Changed> {
+ patches
.iter()
.map(|patch| Changed {
path: patch_path(patch, lists),