File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -286,8 +286,10 @@ impl<P: Platform> CheckpointExt<P> for Checkpoint<P> {
286286 /// by `Checkpoint::new_at_block`.
287287 fn building_since ( & self ) -> Instant {
288288 let mut created_at = self . created_at ( ) ;
289- while let Some ( prev) = self . prev ( ) {
289+ let mut current = self . clone ( ) ;
290+ while let Some ( prev) = current. prev ( ) {
290291 created_at = prev. created_at ( ) ;
292+ current = prev;
291293 }
292294 created_at
293295 }
Original file line number Diff line number Diff line change @@ -107,13 +107,13 @@ impl<P: Platform> RootScope<P> {
107107 ) {
108108 let next = scope_of ( next_step) ;
109109 let prev = self . current . replace ( next. clone ( ) ) ;
110- let mut root = self . root . write ( ) ;
111110
112111 if prev != next {
113112 // Scope changed. We will need to leave all scopes from `prev`
114113 // up to the common ancestor, then enter all scopes from the
115114 // common ancestor to `next`.
116115 let common = prev. common_ancestor ( & next) ;
116+ let mut root = self . root . write ( ) ;
117117
118118 for s in prev. between ( & common) {
119119 root. get_mut ( & s) . expect ( "scope should exist" ) . leave ( ) ;
You can’t perform that action at this time.
0 commit comments