@@ -82,6 +82,7 @@ pub fn gen_lint_group_list(lints: Vec<Lint>) -> Vec<String> {
82
82
}
83
83
} )
84
84
. sorted ( )
85
+ . collect :: < Vec < String > > ( )
85
86
}
86
87
87
88
/// 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> {
98
99
. unique ( )
99
100
. map ( |module| format ! ( "pub mod {};" , module) )
100
101
. sorted ( )
102
+ . collect :: < Vec < String > > ( )
101
103
}
102
104
103
105
/// 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> {
118
120
119
121
/// Generates the `register_removed` code in `./clippy_lints/src/lib.rs`.
120
122
pub 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
+ } )
129
134
} )
130
- } ) )
131
- . collect ( )
135
+ . flatten ( )
136
+ . collect :: < Vec < String > > ( )
132
137
}
133
138
134
139
/// Gathers all files in `src/clippy_lints` and gathers all lints inside
0 commit comments