Compare commits

..

No commits in common. "feat/add-difference" and "main" have entirely different histories.

2 changed files with 0 additions and 16 deletions

View file

@ -792,11 +792,6 @@ impl Automerge {
bytes
}
/// Mark the document as saved
pub fn mark_saved(&mut self) {
self.saved = self.get_heads();
}
/// Save the changes since the last call to [Self::save`]
///
/// The output of this will not be a compressed document format, but a series of individual

View file

@ -112,17 +112,6 @@ impl Change {
self.stored.iter_ops()
}
pub fn difference(&self) -> (u32, u32) {
self.iter_ops()
.map(|op| match op.action {
1 => (1, 0),
3 => (0, 1),
_ => (0, 0),
})
.reduce(|acc, x| (acc.0 + x.0, acc.1 + x.1))
.unwrap_or_default()
}
pub fn extra_bytes(&self) -> &[u8] {
self.stored.extra_bytes()
}