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
commit422056962f0c53e36d00501d54f710365bc21f65 (patch)
tree6d0275eb1e8b584429178b9e9a2935971de485f8 /src/document/store.rs
parent9b976a6c4add3719b8f9afef53578ff778b50aa1 (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),