Skip to content

Commit

Permalink
Rollup merge of #69546 - matthiaskrgr:slice_to_vec, r=davidtwco,nagisa
Browse files Browse the repository at this point in the history
use to_vec() instead of .iter().cloned().collect() to convert slices to vecs.
  • Loading branch information
Dylan-DPC authored Feb 29, 2020
2 parents 2774d48 + 0c5d497 commit ba2df27
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 ba2df27

Please sign in to comment.