@@ -677,7 +677,11 @@ fn down_with_no_worktrees_opens_create_dialog() -> Result<()> {
677677
678678#[ test]
679679fn find_selected_line_locates_branch_in_flat_lines ( ) {
680- let branches = vec ! [ "main" . to_string( ) , "develop" . to_string( ) , "feature" . to_string( ) ] ;
680+ let branches = vec ! [
681+ "main" . to_string( ) ,
682+ "develop" . to_string( ) ,
683+ "feature" . to_string( ) ,
684+ ] ;
681685 let dialog = dialog:: CreateDialog :: new ( & branches, & [ ] , Some ( "develop" ) ) ;
682686
683687 let selected_line = dialog. find_selected_line ( ) ;
@@ -766,7 +770,10 @@ fn scroll_offset_never_exceeds_content_bounds() {
766770 dialog. ensure_selected_visible ( visible_height) ;
767771
768772 let max_offset = dialog. flat_lines . len ( ) . saturating_sub ( visible_height) ;
769- assert_eq ! ( dialog. scroll_offset, 0 , "scroll should be 0 when viewport larger than content" ) ;
773+ assert_eq ! (
774+ dialog. scroll_offset, 0 ,
775+ "scroll should be 0 when viewport larger than content"
776+ ) ;
770777 assert ! ( dialog. scroll_offset <= max_offset) ;
771778}
772779
@@ -809,7 +816,10 @@ fn wrap_around_from_last_to_first_adjusts_scroll() {
809816 dialog. move_base ( 1 ) ;
810817
811818 assert_eq ! ( dialog. base_selected, 0 ) ;
812- assert_eq ! ( dialog. scroll_offset, 0 , "scroll should reset to top after wrap-around" ) ;
819+ assert_eq ! (
820+ dialog. scroll_offset, 0 ,
821+ "scroll should reset to top after wrap-around"
822+ ) ;
813823}
814824
815825#[ test]
@@ -823,12 +833,13 @@ fn scroll_with_multiple_groups() {
823833 let dialog = dialog:: CreateDialog :: new ( & branches, & worktrees, Some ( "main" ) ) ;
824834
825835 // Verify flat_lines includes both groups
826- let has_branch_header = dialog. flat_lines . iter ( ) . any ( |line| {
827- matches ! ( line, dialog:: LineType :: GroupHeader { title } if title == "Branches" )
828- } ) ;
829- let has_worktree_header = dialog. flat_lines . iter ( ) . any ( |line| {
830- matches ! ( line, dialog:: LineType :: GroupHeader { title } if title == "Worktrees" )
831- } ) ;
836+ let has_branch_header = dialog
837+ . flat_lines
838+ . iter ( )
839+ . any ( |line| matches ! ( line, dialog:: LineType :: GroupHeader { title } if title == "Branches" ) ) ;
840+ let has_worktree_header = dialog. flat_lines . iter ( ) . any (
841+ |line| matches ! ( line, dialog:: LineType :: GroupHeader { title } if title == "Worktrees" ) ,
842+ ) ;
832843
833844 assert ! ( has_branch_header, "should have Branches header" ) ;
834845 assert ! ( has_worktree_header, "should have Worktrees header" ) ;
0 commit comments