Skip to content

Commit c4c3ebd

Browse files
authored
Merge pull request #454 from dtolnay/clippy
Suppress redundant_field_names clippy lint
2 parents 2901cfd + 2266152 commit c4c3ebd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

impl/src/expand.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ fn impl_struct(input: Struct) -> TokenStream {
171171
let source_var = Ident::new("source", span);
172172
let body = from_initializer(from_field, backtrace_field, &source_var);
173173
let from_function = quote! {
174+
#[allow(clippy::redundant_field_names)]
174175
fn from(#source_var: #from) -> Self {
175176
#ty #body
176177
}
@@ -453,6 +454,7 @@ fn impl_enum(input: Enum) -> TokenStream {
453454
let source_var = Ident::new("source", span);
454455
let body = from_initializer(from_field, backtrace_field, &source_var);
455456
let from_function = quote! {
457+
#[allow(clippy::redundant_field_names)]
456458
fn from(#source_var: #from) -> Self {
457459
#ty::#variant #body
458460
}

0 commit comments

Comments
 (0)