aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/history.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core/src/history.rs')
-rw-r--r--helix-core/src/history.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/helix-core/src/history.rs b/helix-core/src/history.rs
index b361b3f4..67ded166 100644
--- a/helix-core/src/history.rs
+++ b/helix-core/src/history.rs
@@ -126,7 +126,6 @@ impl History {
let last_child = current_revision.last_child?;
self.current = last_child.get();
- let last_child_revision = &self.revisions[last_child.get()];
Some(&self.revisions[last_child.get()].transaction)
}
@@ -376,21 +375,21 @@ mod test {
if let Some(transaction) = history.undo() {
transaction.apply(&mut state.doc);
}
- };
+ }
fn earlier(history: &mut History, state: &mut State, uk: UndoKind) {
let txns = history.earlier(uk);
for txn in txns {
txn.apply(&mut state.doc);
}
- };
+ }
fn later(history: &mut History, state: &mut State, uk: UndoKind) {
let txns = history.later(uk);
for txn in txns {
txn.apply(&mut state.doc);
}
- };
+ }
fn commit_change(
history: &mut History,
@@ -401,7 +400,7 @@ mod test {
let txn = Transaction::change(&state.doc, vec![change.clone()].into_iter());
history.commit_revision_at_timestamp(&txn, &state, instant);
txn.apply(&mut state.doc);
- };
+ }
let t0 = Instant::now();
let t = |n| t0.checked_add(Duration::from_secs(n)).unwrap();