From 422056962f0c53e36d00501d54f710365bc21f65 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2026 22:31:49 +0100 Subject: document: introduce patch log --- src/document/store.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/document/store.rs') 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 { - 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 { + patches .iter() .map(|patch| Changed { path: patch_path(patch, lists), -- cgit v1.3.1