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 {
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 ) )
277
- }
275
+ Time :: RealTime ( time) =>
276
+ time. duration_since ( SystemTime :: now ( ) ) . unwrap_or ( Duration :: new ( 0 , 0 ) ) ,
278
277
}
279
278
}
280
279
}
Original file line number Diff line number Diff line change @@ -212,16 +212,14 @@ impl PartialOrd for VClock {
212
212
for ( l, r) in iter {
213
213
match order {
214
214
Ordering :: Equal => order = l. cmp ( r) ,
215
- Ordering :: Less => {
215
+ Ordering :: Less =>
216
216
if l > r {
217
217
return None ;
218
- }
219
- }
220
- Ordering :: Greater => {
218
+ } ,
219
+ Ordering :: Greater =>
221
220
if l < r {
222
221
return None ;
223
- }
224
- }
222
+ } ,
225
223
}
226
224
}
227
225
@@ -236,16 +234,18 @@ impl PartialOrd for VClock {
236
234
Ordering :: Equal => Some ( order) ,
237
235
// Right has at least 1 element > than the implicit 0,
238
236
// 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
+ } ,
243
242
// Left has at least 1 element > than the implicit 0,
244
243
// 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
+ } ,
249
249
}
250
250
}
251
251
You can’t perform that action at this time.
0 commit comments