Skip to content

Commit

Permalink
use to_vec() instead of .iter().cloned().collect() to convert slices …
Browse files Browse the repository at this point in the history
…to vecs.
  • Loading branch information
matthiaskrgr committed Feb 28, 2020
1 parent bfc32dd commit 0c5d497
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_builtin_macros/deriving/generic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,14 +588,14 @@ impl<'a> TraitDef<'a> {
span: self.span,
bound_generic_params: wb.bound_generic_params.clone(),
bounded_ty: wb.bounded_ty.clone(),
bounds: wb.bounds.iter().cloned().collect(),
bounds: wb.bounds.to_vec(),
})
}
ast::WherePredicate::RegionPredicate(ref rb) => {
ast::WherePredicate::RegionPredicate(ast::WhereRegionPredicate {
span: self.span,
lifetime: rb.lifetime,
bounds: rb.bounds.iter().cloned().collect(),
bounds: rb.bounds.to_vec(),
})
}
ast::WherePredicate::EqPredicate(ref we) => {
Expand Down

0 comments on commit 0c5d497

Please sign in to comment.