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
This commit is contained in:
Dylan DPC
2020-02-04 21:51:56 +01:00
committed by GitHub
4 changed files with 5 additions and 15 deletions

View File

@@ -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>");
}
}