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"
177177new_without_default = " allow"
178178non_canonical_clone_impl = " allow"
179179non_canonical_partial_ord_impl = " allow"
180- redundant_closure = " allow"
181180redundant_pattern_matching = " allow"
182181search_is_some = " allow"
183182self_named_constructors = " allow"
Original file line number Diff line number Diff line change @@ -258,12 +258,12 @@ impl Body {
258258 }
259259 }
260260 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 ) ;
262262 }
263263 Pat :: Ref { pat, .. } => f ( * pat) ,
264264 Pat :: Slice { prefix, slice, suffix } => {
265265 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 ) ;
267267 }
268268 Pat :: Record { args, .. } => {
269269 args. iter ( ) . for_each ( |RecordFieldPat { pat, .. } | f ( * pat) ) ;
Original file line number Diff line number Diff line change @@ -3152,7 +3152,7 @@ impl DeriveHelper {
31523152 . and_then ( |it| it. get ( self . idx as usize ) )
31533153 . cloned ( ) ,
31543154 }
3155- . unwrap_or_else ( || Name :: missing ( ) )
3155+ . unwrap_or_else ( Name :: missing)
31563156 }
31573157}
31583158
@@ -4421,7 +4421,7 @@ impl Type {
44214421 traits_in_scope,
44224422 with_local_impls. and_then ( |b| b. id . containing_block ( ) ) . into ( ) ,
44234423 name,
4424- & mut |id| callback ( id ) ,
4424+ callback,
44254425 ) ;
44264426 }
44274427
Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ impl SourceToDefCtx<'_, '_> {
308308 pub ( super ) fn type_param_to_def ( & mut self , src : InFile < ast:: TypeParam > ) -> Option < TypeParamId > {
309309 let container: ChildContainer = self . find_generic_param_container ( src. syntax ( ) ) ?. into ( ) ;
310310 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)
312312 }
313313
314314 pub ( super ) fn lifetime_param_to_def (
@@ -326,10 +326,7 @@ impl SourceToDefCtx<'_, '_> {
326326 ) -> Option < ConstParamId > {
327327 let container: ChildContainer = self . find_generic_param_container ( src. syntax ( ) ) ?. into ( ) ;
328328 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)
333330 }
334331
335332 pub ( super ) fn generic_param_to_def (
You can’t perform that action at this time.
0 commit comments