Skip to content
Myr

Fix semicolon_if_nothing_returned pedantic clippy lint

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

warning: consider adding a `;` to the last statement for consistent formatting --> serde_derive/src/pretend.rs:124:17 | 124 | patterns.push(quote!(#type_ident::#variant_ident { #(#members: #placeholders),* })) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `patterns.push(quote!(#type_ident::#variant_ident { #(#members: #placeholders),* }));` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned = note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::semicolon_if_nothing_returned)]`

authored by David Tolnay · committed by David Tolnay · parent 3587aed · 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/pretend.rs+1 added-1 removed
119 unmodified lines
120 Style::Struct | Style::Tuple | Style::Newtype => {121 let variant_ident = &variant.ident;122 let members = variant.fields.iter().map(|field| &field.member);123 let placeholders = (0usize..).map(|i| format_ident!("__v{}", i));124 patterns.push(quote!(#type_ident::#variant_ident { #(#members: #placeholders),* }))124 patterns.push(quote!(#type_ident::#variant_ident { #(#members: #placeholders),* }));125 }126 Style::Unit => {}127 }128 }
60 unmodified lines