about summary refs log tree commit diff
path: root/src/librustc_builtin_macros
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-02-29 02:16:20 +0100
committerGitHub <noreply@github.com>2020-02-29 02:16:20 +0100
commitba2df27525ab535aa600cd25fda4aa7f0f13a2aa (patch)
tree73eab702c8fdc66b472cc1d3a3ff2a9fe4b282e9 /src/librustc_builtin_macros
parent2774d4833709919812c9414c6ea642d42465f208 (diff)
parent0c5d497603129d3bf25e83e3e387bb39202b34ef (diff)
downloadrust-ba2df27525ab535aa600cd25fda4aa7f0f13a2aa.tar.gz
rust-ba2df27525ab535aa600cd25fda4aa7f0f13a2aa.zip
Rollup merge of #69546 - matthiaskrgr:slice_to_vec, r=davidtwco,nagisa
use to_vec() instead of .iter().cloned().collect() to convert slices to vecs.
Diffstat (limited to 'src/librustc_builtin_macros')
-rw-r--r--src/librustc_builtin_macros/deriving/generic/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_builtin_macros/deriving/generic/mod.rs b/src/librustc_builtin_macros/deriving/generic/mod.rs
index 00ed05608b5..7f7ee6e0fed 100644
--- a/src/librustc_builtin_macros/deriving/generic/mod.rs
+++ b/src/librustc_builtin_macros/deriving/generic/mod.rs
@@ -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) => {