Skip to content

Commit 7d7d5e9

Browse files
author
Markus Westerlind
committed
Fix review comments
1 parent ee9764b commit 7d7d5e9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/undo_log.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ pub trait UndoLogs<T> {
2424
/// enclosing snapshot be rolleod back.
2525
fn push(&mut self, undo: T);
2626

27+
/// Removes all items from the undo log.
2728
fn clear(&mut self);
2829

30+
/// Extends the undo log with many undos.
2931
fn extend<I>(&mut self, undos: I)
3032
where
3133
Self: Sized,
@@ -40,23 +42,23 @@ where
4042
U: UndoLogs<T>,
4143
{
4244
fn in_snapshot(&self) -> bool {
43-
(**self).in_snapshot()
45+
U::in_snapshot(self)
4446
}
4547
fn num_open_snapshots(&self) -> usize {
46-
(**self).num_open_snapshots()
48+
U::num_open_snapshots(self)
4749
}
4850
fn push(&mut self, undo: T) {
49-
(**self).push(undo)
51+
U::push(self, undo)
5052
}
5153
fn clear(&mut self) {
52-
(**self).clear();
54+
U::clear(self);
5355
}
5456
fn extend<I>(&mut self, undos: I)
5557
where
5658
Self: Sized,
5759
I: IntoIterator<Item = T>,
5860
{
59-
(**self).extend(undos)
61+
U::extend(self, undos)
6062
}
6163
}
6264

0 commit comments

Comments
 (0)