@@ -223,7 +223,7 @@ fn get_pathspecs_default_excludes() -> Vec<String> {
223223 . chain ( & [
224224 "doc/release-notes/release-notes-*" , // archived notes
225225 ] )
226- . map ( |s| format ! ( ":(exclude){}" , s ) )
226+ . map ( |s| format ! ( ":(exclude){s}" ) )
227227 . collect ( )
228228}
229229
@@ -280,8 +280,7 @@ fn lint_commit_msg() -> LintResult {
280280 if let Some ( line) = commit_info. lines ( ) . nth ( 1 ) {
281281 if !line. is_empty ( ) {
282282 println ! (
283- "The subject line of commit hash {} is followed by a non-empty line. Subject lines should always be followed by a blank line." ,
284- hash
283+ "The subject line of commit hash {hash} is followed by a non-empty line. Subject lines should always be followed by a blank line."
285284 ) ;
286285 good = false ;
287286 }
@@ -351,15 +350,14 @@ fn lint_py_lint() -> LintResult {
351350
352351 match cmd. status ( ) {
353352 Ok ( status) if status. success ( ) => Ok ( ( ) ) ,
354- Ok ( _) => Err ( format ! ( "`{}` found errors!" , bin_name ) ) ,
353+ Ok ( _) => Err ( format ! ( "`{bin_name }` found errors!" ) ) ,
355354 Err ( e) if e. kind ( ) == ErrorKind :: NotFound => {
356355 println ! (
357- "`{}` was not found in $PATH, skipping those checks." ,
358- bin_name
356+ "`{bin_name}` was not found in $PATH, skipping those checks."
359357 ) ;
360358 Ok ( ( ) )
361359 }
362- Err ( e) => Err ( format ! ( "Error running `{}`: {}" , bin_name , e ) ) ,
360+ Err ( e) => Err ( format ! ( "Error running `{bin_name }`: {e}" ) ) ,
363361 }
364362}
365363
@@ -491,7 +489,7 @@ fn get_pathspecs_exclude_whitespace() -> Vec<String> {
491489 "test/lint/git-subtree-check.sh" ,
492490 ]
493491 . iter ( )
494- . map ( |s| format ! ( ":(exclude){}" , s ) ) ,
492+ . map ( |s| format ! ( ":(exclude){s}" ) ) ,
495493 ) ;
496494 list
497495}
@@ -650,14 +648,13 @@ still succeed, but silently be buggy. For example, a slower fallback algorithm c
650648even though bitcoin-build-config.h indicates that a faster feature is available and should be used.
651649
652650If you are unsure which symbol is used, you can find it with this command:
653- git grep --perl-regexp '{}' -- file_name
651+ git grep --perl-regexp '{defines_regex }' -- file_name
654652
655653Make sure to include it with the IWYU pragma. Otherwise, IWYU may falsely instruct to remove the
656654include again.
657655
658656#include <bitcoin-build-config.h> // IWYU pragma: keep
659- "# ,
660- defines_regex
657+ "#
661658 )
662659 . trim ( )
663660 . to_string ( ) ) ;
@@ -714,9 +711,8 @@ One or more markdown links are broken.
714711Note: relative links are preferred as jump-to-file works natively within Emacs, but they are not required.
715712
716713Markdown link errors found:
717- {}
718- "# ,
719- stderr
714+ {stderr}
715+ "#
720716 )
721717 . trim ( )
722718 . to_string ( ) )
@@ -725,7 +721,7 @@ Markdown link errors found:
725721 println ! ( "`mlc` was not found in $PATH, skipping markdown lint check." ) ;
726722 Ok ( ( ) )
727723 }
728- Err ( e) => Err ( format ! ( "Error running mlc: {}" , e ) ) , // Misc errors
724+ Err ( e) => Err ( format ! ( "Error running mlc: {e}" ) ) , // Misc errors
729725 }
730726}
731727
@@ -744,7 +740,7 @@ fn run_all_python_linters() -> LintResult {
744740 . success ( )
745741 {
746742 good = false ;
747- println ! ( "^---- ⚠️ Failure generated from {}" , entry_fn ) ;
743+ println ! ( "^---- ⚠️ Failure generated from {entry_fn}" ) ;
748744 }
749745 }
750746 if good {
0 commit comments