@@ -155,10 +155,10 @@ impl Lint {
155155 f : LintFn ,
156156 ) -> Self {
157157 Lint {
158- name : name ,
158+ name,
159159 ty : LintType :: Fatal ,
160160 f : LintFnTy :: Regular ( f) ,
161- description : description ,
161+ description,
162162 root_type : None ,
163163 }
164164 }
@@ -169,10 +169,10 @@ impl Lint {
169169 f : LintFn ,
170170 ) -> Self {
171171 Lint {
172- name : name ,
172+ name,
173173 ty : LintType :: Warning ,
174174 f : LintFnTy :: Regular ( f) ,
175- description : description ,
175+ description,
176176 root_type : None ,
177177 }
178178 }
@@ -290,7 +290,7 @@ fn lint_inner<'skip>(
290290 results. push ( ( lint, f ( & root, & config) ) ) ;
291291 }
292292
293- let mut recursive_lints = BTreeSet :: from_iter ( recursive_lints. into_iter ( ) ) ;
293+ let mut recursive_lints = BTreeSet :: from_iter ( recursive_lints) ;
294294 let mut recursive_errors = BTreeMap :: new ( ) ;
295295 root. walk (
296296 & WalkConfiguration :: default ( )
@@ -327,7 +327,7 @@ fn lint_inner<'skip>(
327327 } ,
328328 ) ?;
329329 // Extend our overall result set with the recursive-lint errors.
330- results. extend ( recursive_errors. into_iter ( ) . map ( | ( lint , e ) | ( lint , e ) ) ) ;
330+ results. extend ( recursive_errors) ;
331331 // Any recursive lint still in this list succeeded.
332332 results. extend ( recursive_lints. into_iter ( ) . map ( |lint| ( lint, lint_ok ( ) ) ) ) ;
333333 for ( lint, r) in results {
@@ -511,7 +511,7 @@ fn check_utf8(e: &WalkComponent, _config: &LintExecutionConfig) -> LintRecursive
511511
512512 if e. file_type . is_symlink ( ) {
513513 let target = e. dir . read_link_contents ( filename) ?;
514- if ! target. to_str ( ) . is_some ( ) {
514+ if target. to_str ( ) . is_none ( ) {
515515 return lint_err ( format ! (
516516 "{}: Found non-utf8 symlink target" ,
517517 PathQuotedDisplay :: new( & path)
@@ -754,7 +754,7 @@ Any content here in the container image will be masked at runtime.
754754) ;
755755fn check_boot ( root : & Dir , config : & LintExecutionConfig ) -> LintResult {
756756 let Some ( d) = root. open_dir_optional ( "boot" ) ? else {
757- return lint_err ( format ! ( "Missing /boot directory" ) ) ;
757+ return lint_err ( "Missing /boot directory" ) ;
758758 } ;
759759
760760 // First collect all entries to determine if the directory is empty
@@ -1161,7 +1161,7 @@ mod tests {
11611161 output_str. clear ( ) ;
11621162
11631163 // Test case 2: Iterator with one item
1164- let items_one = vec ! [ "item1" ] ;
1164+ let items_one = [ "item1" ] ;
11651165 format_items ( & config, header, items_one. iter ( ) , & mut output_str) ?;
11661166 assert_eq ! ( output_str, "Test Header:\n item1\n " ) ;
11671167 output_str. clear ( ) ;
@@ -1194,7 +1194,7 @@ mod tests {
11941194 output_str. clear ( ) ;
11951195
11961196 // Test case 2: Iterator with fewer items than DEFAULT_TRUNCATED_OUTPUT
1197- let items_few = vec ! [ "item1" , "item2" ] ;
1197+ let items_few = [ "item1" , "item2" ] ;
11981198 format_items ( & config, header, items_few. iter ( ) , & mut output_str) ?;
11991199 assert_eq ! ( output_str, "Test Header:\n item1\n item2\n " ) ;
12001200 output_str. clear ( ) ;
@@ -1246,7 +1246,7 @@ mod tests {
12461246 let header = "Numbers" ;
12471247 let mut output_str = String :: new ( ) ;
12481248
1249- let items_numbers = vec ! [ 1 , 2 , 3 ] ;
1249+ let items_numbers = [ 1 , 2 , 3 ] ;
12501250 format_items ( & config, header, items_numbers. iter ( ) , & mut output_str) ?;
12511251 similar_asserts:: assert_eq!( output_str, "Numbers:\n 1\n 2\n 3\n " ) ;
12521252
0 commit comments