@@ -365,9 +365,13 @@ impl<'a> FileDiff<'a> {
365
365
// update current position and print the whole section
366
366
diff_disp. update_curr_pos ( hunk. ln1_start ( ) - context, hunk. ln2_start ( ) - context) ;
367
367
// check if we have something to display other than just context
368
- let print_lines1 = diff_disp. hunk_lines [ 0 ] . split ( '\n' ) . any ( |x| x. starts_with ( '-' ) || x. starts_with ( '!' ) ) ;
368
+ let print_lines1 = diff_disp. hunk_lines [ 0 ]
369
+ . split ( '\n' )
370
+ . any ( |x| x. starts_with ( '-' ) || x. starts_with ( '!' ) ) ;
369
371
diff_disp. print_section ( true , print_lines1) ;
370
- let print_lines2 = diff_disp. hunk_lines [ 1 ] . split ( '\n' ) . any ( |x| x. starts_with ( '-' ) || x. starts_with ( '!' ) ) ;
372
+ let print_lines2 = diff_disp. hunk_lines [ 1 ]
373
+ . split ( '\n' )
374
+ . any ( |x| x. starts_with ( '-' ) || x. starts_with ( '!' ) ) ;
371
375
diff_disp. print_section ( false , print_lines2) ;
372
376
}
373
377
@@ -425,9 +429,13 @@ impl<'a> FileDiff<'a> {
425
429
diff_disp. write_line ( self . file1 , diff_disp. curr_pos1 , end1, " " , true ) ?;
426
430
diff_disp. write_line ( self . file2 , diff_disp. curr_pos2 , end2, " " , false ) ?;
427
431
}
428
- let print_lines1 = diff_disp. hunk_lines [ 0 ] . split ( '\n' ) . any ( |x| x. starts_with ( '-' ) || x. starts_with ( '!' ) ) ;
432
+ let print_lines1 = diff_disp. hunk_lines [ 0 ]
433
+ . split ( '\n' )
434
+ . any ( |x| x. starts_with ( '-' ) || x. starts_with ( '!' ) ) ;
429
435
diff_disp. print_section ( true , print_lines1) ;
430
- let print_lines2 = diff_disp. hunk_lines [ 1 ] . split ( '\n' ) . any ( |x| x. starts_with ( '+' ) || x. starts_with ( '!' ) ) ;
436
+ let print_lines2 = diff_disp. hunk_lines [ 1 ]
437
+ . split ( '\n' )
438
+ . any ( |x| x. starts_with ( '+' ) || x. starts_with ( '!' ) ) ;
431
439
diff_disp. print_section ( false , print_lines2) ;
432
440
}
433
441
0 commit comments