@@ -10,7 +10,7 @@ use log::trace;
10
10
11
11
use rustc_data_structures:: fx:: FxHashMap ;
12
12
use rustc_hir:: def_id:: DefId ;
13
- use rustc_index:: vec :: { Idx , IndexVec } ;
13
+ use rustc_index:: { Idx , IndexVec } ;
14
14
use rustc_middle:: mir:: Mutability ;
15
15
use rustc_middle:: ty:: layout:: TyAndLayout ;
16
16
use rustc_span:: Span ;
@@ -272,8 +272,9 @@ impl Time {
272
272
fn get_wait_time ( & self , clock : & Clock ) -> Duration {
273
273
match self {
274
274
Time :: Monotonic ( instant) => instant. duration_since ( clock. now ( ) ) ,
275
- Time :: RealTime ( time) =>
276
- time. duration_since ( SystemTime :: now ( ) ) . unwrap_or ( Duration :: new ( 0 , 0 ) ) ,
275
+ Time :: RealTime ( time) => {
276
+ time. duration_since ( SystemTime :: now ( ) ) . unwrap_or ( Duration :: new ( 0 , 0 ) )
277
+ }
277
278
}
278
279
}
279
280
}
@@ -603,10 +604,11 @@ impl<'mir, 'tcx: 'mir> ThreadManager<'mir, 'tcx> {
603
604
// this allows us to have a deterministic scheduler.
604
605
for thread in self . threads . indices ( ) {
605
606
match self . timeout_callbacks . entry ( thread) {
606
- Entry :: Occupied ( entry) =>
607
+ Entry :: Occupied ( entry) => {
607
608
if entry. get ( ) . call_time . get_wait_time ( clock) == Duration :: new ( 0 , 0 ) {
608
609
return Some ( ( thread, entry. remove ( ) . callback ) ) ;
609
- } ,
610
+ }
611
+ }
610
612
Entry :: Vacant ( _) => { }
611
613
}
612
614
}
0 commit comments