@@ -417,10 +417,10 @@ pub fn check(path: &Path, bad: &mut bool) {
417417 return ;
418418 }
419419 // Shell completions are automatically generated
420- if let Some ( p) = file. parent ( ) {
421- if p. ends_with ( Path :: new ( "src/etc/completions" ) ) {
422- return ;
423- }
420+ if let Some ( p) = file. parent ( )
421+ && p. ends_with ( Path :: new ( "src/etc/completions" ) )
422+ {
423+ return ;
424424 }
425425 let [
426426 mut skip_cr,
@@ -604,25 +604,25 @@ pub fn check(path: &Path, bad: &mut bool) {
604604 backtick_count += comment_text. chars ( ) . filter ( |ch| * ch == '`' ) . count ( ) ;
605605 }
606606 comment_block = Some ( ( start_line, backtick_count) ) ;
607- } else if let Some ( ( start_line, backtick_count) ) = comment_block. take ( ) {
608- if backtick_count % 2 == 1 {
609- let mut err = | msg : & str | {
610- tidy_error ! ( bad , "{}:{start_line}: {msg}" , file . display ( ) ) ;
611- } ;
612- let block_len = ( i + 1 ) - start_line ;
613- if block_len == 1 {
614- suppressible_tidy_err ! (
615- err ,
616- skip_odd_backticks ,
617- "comment with odd number of backticks"
618- ) ;
619- } else {
620- suppressible_tidy_err ! (
621- err ,
622- skip_odd_backticks ,
623- "{block_len}-line comment block with odd number of backticks"
624- ) ;
625- }
607+ } else if let Some ( ( start_line, backtick_count) ) = comment_block. take ( )
608+ && backtick_count % 2 == 1
609+ {
610+ let mut err = | msg : & str | {
611+ tidy_error ! ( bad , "{}:{start_line}: {msg}" , file . display ( ) ) ;
612+ } ;
613+ let block_len = ( i + 1 ) - start_line ;
614+ if block_len == 1 {
615+ suppressible_tidy_err ! (
616+ err ,
617+ skip_odd_backticks ,
618+ "comment with odd number of backticks"
619+ ) ;
620+ } else {
621+ suppressible_tidy_err ! (
622+ err ,
623+ skip_odd_backticks ,
624+ "{block_len}-line comment block with odd number of backticks"
625+ ) ;
626626 }
627627 }
628628 }
0 commit comments