@@ -235,7 +235,8 @@ fn same_line_else_kw_and_brace(
235235 . lines ( )
236236 . last ( )
237237 . expect ( "initializer expression is multi-lined" )
238- . strip_prefix ( indent. as_ref ( ) ) . is_some_and ( |l| !l. starts_with ( char:: is_whitespace) )
238+ . strip_prefix ( indent. as_ref ( ) )
239+ . is_some_and ( |l| !l. starts_with ( char:: is_whitespace) )
239240}
240241
241242fn allow_single_line_let_else_block ( result : & str , block : & ast:: Block ) -> bool {
@@ -767,7 +768,8 @@ impl FmtVisitor<'_> {
767768 // Make sure that there are at least a single empty line between
768769 // different impl items.
769770 if prev_kind
770- . as_ref ( ) . is_some_and ( |prev_kind| need_empty_line ( prev_kind, & item. kind ) )
771+ . as_ref ( )
772+ . is_some_and ( |prev_kind| need_empty_line ( prev_kind, & item. kind ) )
771773 {
772774 self . push_str ( "\n " ) ;
773775 }
@@ -2483,7 +2485,8 @@ fn rewrite_fn_base(
24832485
24842486 let snuggle_angle_bracket = generics_str
24852487 . lines ( )
2486- . last ( ) . is_some_and ( |l| l. trim_start ( ) . len ( ) == 1 ) ;
2488+ . last ( )
2489+ . is_some_and ( |l| l. trim_start ( ) . len ( ) == 1 ) ;
24872490
24882491 // Note that the width and indent don't really matter, we'll re-layout the
24892492 // return type later anyway.
@@ -2568,7 +2571,8 @@ fn rewrite_fn_base(
25682571 // on the same line.
25692572 params_last_line_contains_comment = param_str
25702573 . lines ( )
2571- . last ( ) . is_some_and ( |last_line| last_line. contains ( "//" ) ) ;
2574+ . last ( )
2575+ . is_some_and ( |last_line| last_line. contains ( "//" ) ) ;
25722576
25732577 if context. config . style_edition ( ) >= StyleEdition :: Edition2027 {
25742578 if closing_paren_overflow_max_width {
@@ -2676,9 +2680,11 @@ fn rewrite_fn_base(
26762680 let snippet = context. snippet ( mk_sp ( snippet_lo, snippet_hi) ) ;
26772681 // Try to preserve the layout of the original snippet.
26782682 let original_starts_with_newline = snippet
2679- . find ( |c| c != ' ' ) . is_some_and ( |i| starts_with_newline ( & snippet[ i..] ) ) ;
2683+ . find ( |c| c != ' ' )
2684+ . is_some_and ( |i| starts_with_newline ( & snippet[ i..] ) ) ;
26802685 let original_ends_with_newline = snippet
2681- . rfind ( |c| c != ' ' ) . is_some_and ( |i| snippet[ i..] . ends_with ( '\n' ) ) ;
2686+ . rfind ( |c| c != ' ' )
2687+ . is_some_and ( |i| snippet[ i..] . ends_with ( '\n' ) ) ;
26822688 let snippet = snippet. trim ( ) ;
26832689 if !snippet. is_empty ( ) {
26842690 result. push ( if original_starts_with_newline {
@@ -3381,7 +3387,8 @@ fn format_generics(
33813387 } ;
33823388 // add missing comments
33833389 let missed_line_comments = missed_comments
3384- . filter ( |missed_comments| !missed_comments. is_empty ( ) ) . is_some_and ( |missed_comments| {
3390+ . filter ( |missed_comments| !missed_comments. is_empty ( ) )
3391+ . is_some_and ( |missed_comments| {
33853392 let is_block = is_last_comment_block ( & missed_comments) ;
33863393 let sep = if is_block { " " } else { "\n " } ;
33873394 result. push_str ( sep) ;
0 commit comments