File tree Expand file tree Collapse file tree 4 files changed +6
-10
lines changed Expand file tree Collapse file tree 4 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,6 @@ needless_doctest_main = "allow"
177
177
new_without_default = " allow"
178
178
non_canonical_clone_impl = " allow"
179
179
non_canonical_partial_ord_impl = " allow"
180
- redundant_closure = " allow"
181
180
redundant_pattern_matching = " allow"
182
181
search_is_some = " allow"
183
182
self_named_constructors = " allow"
Original file line number Diff line number Diff line change @@ -258,12 +258,12 @@ impl Body {
258
258
}
259
259
}
260
260
Pat :: Or ( args) | Pat :: Tuple { args, .. } | Pat :: TupleStruct { args, .. } => {
261
- args. iter ( ) . copied ( ) . for_each ( |p| f ( p ) ) ;
261
+ args. iter ( ) . copied ( ) . for_each ( f ) ;
262
262
}
263
263
Pat :: Ref { pat, .. } => f ( * pat) ,
264
264
Pat :: Slice { prefix, slice, suffix } => {
265
265
let total_iter = prefix. iter ( ) . chain ( slice. iter ( ) ) . chain ( suffix. iter ( ) ) ;
266
- total_iter. copied ( ) . for_each ( |p| f ( p ) ) ;
266
+ total_iter. copied ( ) . for_each ( f ) ;
267
267
}
268
268
Pat :: Record { args, .. } => {
269
269
args. iter ( ) . for_each ( |RecordFieldPat { pat, .. } | f ( * pat) ) ;
Original file line number Diff line number Diff line change @@ -3152,7 +3152,7 @@ impl DeriveHelper {
3152
3152
. and_then ( |it| it. get ( self . idx as usize ) )
3153
3153
. cloned ( ) ,
3154
3154
}
3155
- . unwrap_or_else ( || Name :: missing ( ) )
3155
+ . unwrap_or_else ( Name :: missing)
3156
3156
}
3157
3157
}
3158
3158
@@ -4421,7 +4421,7 @@ impl Type {
4421
4421
traits_in_scope,
4422
4422
with_local_impls. and_then ( |b| b. id . containing_block ( ) ) . into ( ) ,
4423
4423
name,
4424
- & mut |id| callback ( id ) ,
4424
+ callback,
4425
4425
) ;
4426
4426
}
4427
4427
Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ impl SourceToDefCtx<'_, '_> {
308
308
pub ( super ) fn type_param_to_def ( & mut self , src : InFile < ast:: TypeParam > ) -> Option < TypeParamId > {
309
309
let container: ChildContainer = self . find_generic_param_container ( src. syntax ( ) ) ?. into ( ) ;
310
310
let dyn_map = self . cache_for ( container, src. file_id ) ;
311
- dyn_map[ keys:: TYPE_PARAM ] . get ( & src. value ) . copied ( ) . map ( |it| TypeParamId :: from_unchecked ( it ) )
311
+ dyn_map[ keys:: TYPE_PARAM ] . get ( & src. value ) . copied ( ) . map ( TypeParamId :: from_unchecked)
312
312
}
313
313
314
314
pub ( super ) fn lifetime_param_to_def (
@@ -326,10 +326,7 @@ impl SourceToDefCtx<'_, '_> {
326
326
) -> Option < ConstParamId > {
327
327
let container: ChildContainer = self . find_generic_param_container ( src. syntax ( ) ) ?. into ( ) ;
328
328
let dyn_map = self . cache_for ( container, src. file_id ) ;
329
- dyn_map[ keys:: CONST_PARAM ]
330
- . get ( & src. value )
331
- . copied ( )
332
- . map ( |it| ConstParamId :: from_unchecked ( it) )
329
+ dyn_map[ keys:: CONST_PARAM ] . get ( & src. value ) . copied ( ) . map ( ConstParamId :: from_unchecked)
333
330
}
334
331
335
332
pub ( super ) fn generic_param_to_def (
You can’t perform that action at this time.
0 commit comments