File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,10 @@ pub trait UndoLogs<T> {
24
24
/// enclosing snapshot be rolleod back.
25
25
fn push ( & mut self , undo : T ) ;
26
26
27
+ /// Removes all items from the undo log.
27
28
fn clear ( & mut self ) ;
28
29
30
+ /// Extends the undo log with many undos.
29
31
fn extend < I > ( & mut self , undos : I )
30
32
where
31
33
Self : Sized ,
@@ -40,23 +42,23 @@ where
40
42
U : UndoLogs < T > ,
41
43
{
42
44
fn in_snapshot ( & self ) -> bool {
43
- ( * * self ) . in_snapshot ( )
45
+ U :: in_snapshot ( self )
44
46
}
45
47
fn num_open_snapshots ( & self ) -> usize {
46
- ( * * self ) . num_open_snapshots ( )
48
+ U :: num_open_snapshots ( self )
47
49
}
48
50
fn push ( & mut self , undo : T ) {
49
- ( * * self ) . push ( undo)
51
+ U :: push ( self , undo)
50
52
}
51
53
fn clear ( & mut self ) {
52
- ( * * self ) . clear ( ) ;
54
+ U :: clear ( self ) ;
53
55
}
54
56
fn extend < I > ( & mut self , undos : I )
55
57
where
56
58
Self : Sized ,
57
59
I : IntoIterator < Item = T > ,
58
60
{
59
- ( * * self ) . extend ( undos)
61
+ U :: extend ( self , undos)
60
62
}
61
63
}
62
64
You can’t perform that action at this time.
0 commit comments