File tree Expand file tree Collapse file tree 2 files changed +16
-17
lines changed
src/tools/miri/src/concurrency Expand file tree Collapse file tree 2 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -272,9 +272,8 @@ impl Time {
272272 fn get_wait_time ( & self , clock : & Clock ) -> Duration {
273273 match self {
274274 Time :: Monotonic ( instant) => instant. duration_since ( clock. now ( ) ) ,
275- Time :: RealTime ( time) => {
276- time. duration_since ( SystemTime :: now ( ) ) . unwrap_or ( Duration :: new ( 0 , 0 ) )
277- }
275+ Time :: RealTime ( time) =>
276+ time. duration_since ( SystemTime :: now ( ) ) . unwrap_or ( Duration :: new ( 0 , 0 ) ) ,
278277 }
279278 }
280279}
Original file line number Diff line number Diff line change @@ -212,16 +212,14 @@ impl PartialOrd for VClock {
212212 for ( l, r) in iter {
213213 match order {
214214 Ordering :: Equal => order = l. cmp ( r) ,
215- Ordering :: Less => {
215+ Ordering :: Less =>
216216 if l > r {
217217 return None ;
218- }
219- }
220- Ordering :: Greater => {
218+ } ,
219+ Ordering :: Greater =>
221220 if l < r {
222221 return None ;
223- }
224- }
222+ } ,
225223 }
226224 }
227225
@@ -236,16 +234,18 @@ impl PartialOrd for VClock {
236234 Ordering :: Equal => Some ( order) ,
237235 // Right has at least 1 element > than the implicit 0,
238236 // so the only valid values are Ordering::Less or None.
239- Ordering :: Less => match order {
240- Ordering :: Less | Ordering :: Equal => Some ( Ordering :: Less ) ,
241- Ordering :: Greater => None ,
242- } ,
237+ Ordering :: Less =>
238+ match order {
239+ Ordering :: Less | Ordering :: Equal => Some ( Ordering :: Less ) ,
240+ Ordering :: Greater => None ,
241+ } ,
243242 // Left has at least 1 element > than the implicit 0,
244243 // so the only valid values are Ordering::Greater or None.
245- Ordering :: Greater => match order {
246- Ordering :: Greater | Ordering :: Equal => Some ( Ordering :: Greater ) ,
247- Ordering :: Less => None ,
248- } ,
244+ Ordering :: Greater =>
245+ match order {
246+ Ordering :: Greater | Ordering :: Equal => Some ( Ordering :: Greater ) ,
247+ Ordering :: Less => None ,
248+ } ,
249249 }
250250 }
251251
You can’t perform that action at this time.
0 commit comments