1
Fork 0

fix couple of perf related clipyp 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:
Matthias Krüger 2020-02-04 02:28:11 +01:00
parent 8417d68de5
commit fe1314dbc4
4 changed files with 5 additions and 15 deletions

View file

@ -3629,14 +3629,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>");
}
}