Skip to content
Myr

Fix redundant_closure clippy lint from PR 3038

Before adoption: this commit came in with the history the project adopted, so no landing records it.

warning: redundant closure --> serde_derive/src/ser.rs:461:65 | 461 | let field_names = (0..variant.fields.len()).map(|i| field_i(i)); | ^^^^^^^^^^^^^^ help: replace the closure with the function itself: `field_i` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `-W clippy::redundant-closure` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::redundant_closure)]`

authored by David Tolnay · committed by David Tolnay · parent e65b3e7 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:serde_derive/src/ser.rs+1 added-1 removed
456 unmodified lines
457 #this_value::#variant_ident(ref __field0)458 }459 }460 Style::Tuple => {461 let field_names = (0..variant.fields.len()).map(|i| field_i(i));461 let field_names = (0..variant.fields.len()).map(field_i);462 quote! {463 #this_value::#variant_ident(#(ref #field_names),*)464 }465 }
904 unmodified lines