@@ -82,6 +82,7 @@ pub fn gen_lint_group_list(lints: Vec<Lint>) -> Vec<String> {
8282 }
8383 } )
8484 . sorted ( )
85+ . collect :: < Vec < String > > ( )
8586}
8687
8788/// Generates the `pub mod module_name` list in `clippy_lints/src/lib.rs`.
@@ -98,6 +99,7 @@ pub fn gen_modules_list(lints: Vec<Lint>) -> Vec<String> {
9899 . unique ( )
99100 . map ( |module| format ! ( "pub mod {};" , module) )
100101 . sorted ( )
102+ . collect :: < Vec < String > > ( )
101103}
102104
103105/// Generates the list of lint links at the bottom of the README
@@ -118,17 +120,20 @@ pub fn gen_changelog_lint_list(lints: Vec<Lint>) -> Vec<String> {
118120
119121/// Generates the `register_removed` code in `./clippy_lints/src/lib.rs`.
120122pub fn gen_deprecated ( lints : & [ Lint ] ) -> Vec < String > {
121- itertools:: flatten ( lints. iter ( ) . filter_map ( |l| {
122- l. clone ( ) . deprecation . and_then ( |depr_text| {
123- Some ( vec ! [
124- " store.register_removed(" . to_string( ) ,
125- format!( " \" {}\" ," , l. name) ,
126- format!( " \" {}\" ," , depr_text) ,
127- " );" . to_string( ) ,
128- ] )
123+ lints
124+ . iter ( )
125+ . filter_map ( |l| {
126+ l. clone ( ) . deprecation . and_then ( |depr_text| {
127+ Some ( vec ! [
128+ " store.register_removed(" . to_string( ) ,
129+ format!( " \" {}\" ," , l. name) ,
130+ format!( " \" {}\" ," , depr_text) ,
131+ " );" . to_string( ) ,
132+ ] )
133+ } )
129134 } )
130- } ) )
131- . collect ( )
135+ . flatten ( )
136+ . collect :: < Vec < String > > ( )
132137}
133138
134139/// Gathers all files in `src/clippy_lints` and gathers all lints inside
0 commit comments