File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -567,13 +567,15 @@ mod tests {
567
567
let mut runnables = analysis. runnables ( position. file_id ) . unwrap ( ) ;
568
568
runnables. sort_by_key ( |it| ( it. nav . full_range . start ( ) , it. nav . name . clone ( ) ) ) ;
569
569
570
- let navigation_targets = runnables. iter ( ) . map ( |a| a. nav . clone ( ) ) . collect :: < Vec < _ > > ( ) ;
571
- expect. assert_debug_eq ( & navigation_targets) ;
570
+ let mut navigation_targets = Vec :: with_capacity ( runnables. len ( ) ) ;
571
+ let mut test_kinds = Vec :: with_capacity ( runnables. len ( ) ) ;
572
+ for runnable in runnables {
573
+ test_kinds. push ( runnable. test_kind ( ) ) ;
574
+ navigation_targets. push ( runnable. nav ) ;
575
+ }
572
576
573
- assert_eq ! (
574
- actions,
575
- runnables. into_iter( ) . map( |it| it. test_kind( ) ) . collect:: <Vec <_>>( ) . as_slice( )
576
- ) ;
577
+ expect. assert_debug_eq ( & navigation_targets) ;
578
+ assert_eq ! ( actions, test_kinds. as_slice( ) ) ;
577
579
}
578
580
579
581
fn check_tests ( ra_fixture : & str , expect : Expect ) {
You can’t perform that action at this time.
0 commit comments