summaryrefslogtreecommitdiff
path: root/helix-core/src/history.rs
diff options
context:
space:
mode:
authorNathan Vegdahl2021-07-01 19:55:18 +0000
committerNathan Vegdahl2021-07-02 02:06:52 +0000
commit220bc85821d87f65630601dedd219fd2fa41c0ea (patch)
tree6500a0853a2ac7e95df0123e01f4f8ac582f2949 /helix-core/src/history.rs
parentb571f28641787ae4c5750e91899afdccc6d89ed6 (diff)
Fix all remaining warnings in helix-core except for two.
I'm not sure how to address them, because they look like they might be bugs, and code is involved. Will poke the relevant people.
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();