Skip to content

Commit

Permalink
chore: Small linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Yag000 committed Sep 13, 2023
1 parent db8b24b commit b867bbd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ fn impl_enum_to_string(ast: &syn::DeriveInput) -> TokenStream {

let names = variants.iter().map(|v| &v.ident).collect::<Vec<_>>();

let mut gen = impl_display(&name, &names);
gen.extend(impl_from_str(&name, &names));
gen.extend(impl_from_string(&name));
gen.extend(impl_from_str_trait(&name));
let mut gen = impl_display(name, &names);
gen.extend(impl_from_str(name, &names));
gen.extend(impl_from_string(name));
gen.extend(impl_from_str_trait(name));

gen.into()
gen
}

fn impl_display(name: &syn::Ident, names: &Vec<&syn::Ident>) -> TokenStream {
Expand Down

0 comments on commit b867bbd

Please sign in to comment.