diff options
| author | tv <tv@krebsco.de> | 2026-11-16 20:29:58 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-16 21:31:14 +0100 |
| commit | 5ded0fd2cf6740d5582cded2e7b33015b4579fbb (patch) | |
| tree | 3da389c22250fcea3d39c7ebeb7c8486a28a356e /src/document | |
| parent | e32f4b6681f52659bc4c0e79c3be2b24f3d7495a (diff) | |
access: a put at an event's key held already, judged as made by hand
Automerge writes no put of the value a key holds already, so the test can't have a node
write one: it judges such a change made by hand, a put of the event's bytes at its key,
at a history holding it.
Diffstat (limited to 'src/document')
| -rw-r--r-- | src/document/events.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/document/events.rs b/src/document/events.rs index 687079e..5fce55d 100644 --- a/src/document/events.rs +++ b/src/document/events.rs @@ -132,16 +132,6 @@ pub(crate) fn is_genesis(change: &Change, fold: &str, id: &Id) -> bool { root.is_some_and(|root| genesis(fold, &root).hash() == change.hash()) } -/// Puts `bytes` at the event `id`, held there or not, as no change of a node puts an -/// event: for tests of what a change may write. -#[cfg(test)] -pub(crate) fn put_held(doc: &mut super::Transaction<'_>, id: &Id, bytes: &[u8]) { - use automerge::transaction::Transactable; - let events = events_map(doc).expect("the events' map"); - doc.put(&events, id.to_string(), ScalarValue::Bytes(bytes.to_vec())) - .expect("a put"); -} - #[cfg(test)] mod tests { use super::*; |
