Merge pull request from jeffa5/experiment-apply-change

Stop exposing apply_change
This commit is contained in:
Andrew Jeffery 2022-03-11 11:39:03 +00:00 committed by GitHub
commit 4b52c2053e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions

View file

@ -149,11 +149,6 @@ impl AutoCommit {
self.doc.apply_changes(changes)
}
pub fn apply_change(&mut self, change: Change) {
self.ensure_transaction_closed();
self.doc.apply_change(change)
}
/// Takes all the changes in `other` which are not in `self` and applies them
pub fn merge(&mut self, other: &mut Self) -> Result<Vec<ChangeHash>, AutomergeError> {
self.ensure_transaction_closed();

View file

@ -444,7 +444,7 @@ impl Automerge {
}
/// Apply a single change to this document.
pub fn apply_change(&mut self, change: Change) {
fn apply_change(&mut self, change: Change) {
let ops = self.import_ops(&change, self.history.len());
self.update_history(change);
for op in ops {