File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/tools/miri/src/concurrency Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -378,8 +378,9 @@ impl IndexMut<VectorIdx> for VClock {
378
378
#[ cfg( test) ]
379
379
mod tests {
380
380
381
- use super :: { VClock , VectorIdx } ;
381
+ use super :: { VClock , VTimestamp , VectorIdx } ;
382
382
use rustc_span:: DUMMY_SP ;
383
+ use std:: cmp:: Ordering ;
383
384
384
385
#[ test]
385
386
fn test_equal ( ) {
@@ -396,7 +397,6 @@ mod tests {
396
397
assert_eq ! ( c1, c2) ;
397
398
}
398
399
399
- /*
400
400
#[ test]
401
401
fn test_partial_order ( ) {
402
402
// Small test
@@ -442,14 +442,14 @@ mod tests {
442
442
) ;
443
443
}
444
444
445
- fn from_slice(mut slice: &[VTimestamp ]) -> VClock {
445
+ fn from_slice ( mut slice : & [ u32 ] ) -> VClock {
446
446
while let Some ( 0 ) = slice. last ( ) {
447
447
slice = & slice[ ..slice. len ( ) - 1 ]
448
448
}
449
- VClock(smallvec::SmallVec::from_slice(slice ))
449
+ VClock ( slice . iter ( ) . copied ( ) . map ( |time| VTimestamp { time , span : DUMMY_SP } ) . collect ( ) )
450
450
}
451
451
452
- fn assert_order(l: &[VTimestamp ], r: &[VTimestamp ], o: Option<Ordering>) {
452
+ fn assert_order ( l : & [ u32 ] , r : & [ u32 ] , o : Option < Ordering > ) {
453
453
let l = from_slice ( l) ;
454
454
let r = from_slice ( r) ;
455
455
@@ -505,5 +505,4 @@ mod tests {
505
505
"Invalid alt (>=):\n l: {l:?}\n r: {r:?}"
506
506
) ;
507
507
}
508
- */
509
508
}
You can’t perform that action at this time.
0 commit comments