@@ -246,7 +246,6 @@ fn report_test_diffs(diff: AggregatedTestDiffs) {
246246 println ! ( "No test diffs found" ) ;
247247 return ;
248248 }
249- println ! ( "\n {} test {} found\n " , diff. diffs. len( ) , pluralize( "difference" , diff. diffs. len( ) ) ) ;
250249
251250 fn format_outcome ( outcome : & TestOutcome ) -> String {
252251 match outcome {
@@ -320,34 +319,42 @@ fn report_test_diffs(diff: AggregatedTestDiffs) {
320319 // Sort diffs by job group and test name
321320 grouped_diffs. sort_by ( |( d1, g1) , ( d2, g2) | g1. cmp ( & g2) . then ( d1. test . name . cmp ( & d2. test . name ) ) ) ;
322321
323- for ( diff, job_group) in grouped_diffs {
324- println ! (
325- "- `{}`: {} ({})" ,
326- diff. test. name,
327- format_diff( & diff. diff) ,
328- format_job_group( job_group)
329- ) ;
330- }
322+ output_details (
323+ & format ! ( "Show {} test {}\n " , original_diff_count, pluralize( "diff" , original_diff_count) ) ,
324+ || {
325+ for ( diff, job_group) in grouped_diffs {
326+ println ! (
327+ "- `{}`: {} ({})" ,
328+ diff. test. name,
329+ format_diff( & diff. diff) ,
330+ format_job_group( job_group)
331+ ) ;
332+ }
331333
332- let extra_diffs = diffs. len ( ) . saturating_sub ( max_diff_count) ;
333- if extra_diffs > 0 {
334- println ! ( "\n (and {extra_diffs} additional {})" , pluralize( "test diff" , extra_diffs) ) ;
335- }
334+ let extra_diffs = diffs. len ( ) . saturating_sub ( max_diff_count) ;
335+ if extra_diffs > 0 {
336+ println ! (
337+ "\n (and {extra_diffs} additional {})" ,
338+ pluralize( "test diff" , extra_diffs)
339+ ) ;
340+ }
336341
337- if doctest_count > 0 {
338- println ! (
339- "\n Additionally, {doctest_count} doctest {} were found. These are ignored, as they are noisy." ,
340- pluralize( "diff" , doctest_count)
341- ) ;
342- }
342+ if doctest_count > 0 {
343+ println ! (
344+ "\n Additionally, {doctest_count} doctest {} were found. These are ignored, as they are noisy." ,
345+ pluralize( "diff" , doctest_count)
346+ ) ;
347+ }
343348
344- // Now print the job group index
345- println ! ( "\n **Job group index**\n " ) ;
346- for ( group, jobs) in job_index. into_iter ( ) . enumerate ( ) {
347- println ! (
348- "- {}: {}" ,
349- format_job_group( group as u64 ) ,
350- jobs. iter( ) . map( |j| format!( "`{j}`" ) ) . collect:: <Vec <_>>( ) . join( ", " )
351- ) ;
352- }
349+ // Now print the job group index
350+ println ! ( "\n **Job group index**\n " ) ;
351+ for ( group, jobs) in job_index. into_iter ( ) . enumerate ( ) {
352+ println ! (
353+ "- {}: {}" ,
354+ format_job_group( group as u64 ) ,
355+ jobs. iter( ) . map( |j| format!( "`{j}`" ) ) . collect:: <Vec <_>>( ) . join( ", " )
356+ ) ;
357+ }
358+ } ,
359+ ) ;
353360}
0 commit comments