Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
fewensa committed Jan 27, 2022
1 parent 1a716f4 commit 2687140
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ fn codegen<I: Input>(
pub mod api {}
);

let mut p = Vec::<syn::Path>::new();
for raw in raw_derives {
p.push(Ident::new(&raw, Span::call_site()).into());
}
let p: Vec<syn::Path> = raw_derives
.iter()
.map(|raw| Ident::new(&raw, Span::call_site()).into())
.collect();
let mut derives = GeneratedTypeDerives::default();
derives.append(p.iter().cloned());

Expand Down

0 comments on commit 2687140

Please sign in to comment.