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> {
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
You can’t perform that action at this time.
0 commit comments