File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed 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 {
378378#[ cfg( test) ]
379379mod tests {
380380
381- use super :: { VClock , VectorIdx } ;
381+ use super :: { VClock , VTimestamp , VectorIdx } ;
382382 use rustc_span:: DUMMY_SP ;
383+ use std:: cmp:: Ordering ;
383384
384385 #[ test]
385386 fn test_equal ( ) {
@@ -396,7 +397,6 @@ mod tests {
396397 assert_eq ! ( c1, c2) ;
397398 }
398399
399- /*
400400 #[ test]
401401 fn test_partial_order ( ) {
402402 // Small test
@@ -442,14 +442,14 @@ mod tests {
442442 ) ;
443443 }
444444
445- fn from_slice(mut slice: &[VTimestamp ]) -> VClock {
445+ fn from_slice ( mut slice : & [ u32 ] ) -> VClock {
446446 while let Some ( 0 ) = slice. last ( ) {
447447 slice = & slice[ ..slice. len ( ) - 1 ]
448448 }
449- VClock(smallvec::SmallVec::from_slice(slice ))
449+ VClock ( slice . iter ( ) . copied ( ) . map ( |time| VTimestamp { time , span : DUMMY_SP } ) . collect ( ) )
450450 }
451451
452- fn assert_order(l: &[VTimestamp ], r: &[VTimestamp ], o: Option<Ordering>) {
452+ fn assert_order ( l : & [ u32 ] , r : & [ u32 ] , o : Option < Ordering > ) {
453453 let l = from_slice ( l) ;
454454 let r = from_slice ( r) ;
455455
@@ -505,5 +505,4 @@ mod tests {
505505 "Invalid alt (>=):\n l: {l:?}\n r: {r:?}"
506506 ) ;
507507 }
508- */
509508}
You can’t perform that action at this time.
0 commit comments