about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-02-04 21:51:56 +0100
committerGitHub <noreply@github.com>2020-02-04 21:51:56 +0100
commita25ce40bc9f0206128825676ec0e63a3c032ea4e (patch)
tree76f1c27f84b1fa321718c9022048362d35d166be /src/librustdoc/html
parent3fe4c0ddf970e6be6fb1af81a8c4d81c195a33fb (diff)
parentfe1314dbc42da3331062c9348f7117b3585ad6bd (diff)
downloadrust-a25ce40bc9f0206128825676ec0e63a3c032ea4e.tar.gz
rust-a25ce40bc9f0206128825676ec0e63a3c032ea4e.zip
Rollup merge of #68818 - matthiaskrgr:misc_perf, r=Mark-Simulacrum
fix couple of perf related clippy warnings

librustc: don't clone a type that is copy
librustc_incremental: use faster vector initialization
librustc_typeck: don't clone a type that is copy
librustdoc: don't create a vector where a slice will do
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/render.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index e2a0126a8fa..6a23b230e12 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -3627,14 +3627,7 @@ fn render_impl(
                 for it in &i.inner_impl().items {
                     if let clean::TypedefItem(ref tydef, _) = it.inner {
                         write!(w, "<span class=\"where fmt-newline\">  ");
-                        assoc_type(
-                            w,
-                            it,
-                            &vec![],
-                            Some(&tydef.type_),
-                            AssocItemLink::Anchor(None),
-                            "",
-                        );
+                        assoc_type(w, it, &[], Some(&tydef.type_), AssocItemLink::Anchor(None), "");
                         write!(w, ";</span>");
                     }
                 }