Skip to content

Commit ea94607

Browse files
committed
Combine several push_str calls
1 parent 8eaf68f commit ea94607

File tree

1 file changed

+3
-4
lines changed
  • src/librustdoc/html/render

1 file changed

+3
-4
lines changed

src/librustdoc/html/render/mod.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -4426,13 +4426,12 @@ fn sidebar_deref_methods(cx: &Context<'_>, impl_: &Impl, v: &Vec<Impl>) -> Strin
44264426
let id = deref_id_map
44274427
.get(&real_target.def_id().unwrap())
44284428
.expect("Deref section without derived id");
4429-
out.push_str(&format!("<a class=\"sidebar-title\" href=\"#{}\">", id));
44304429
out.push_str(&format!(
4431-
"Methods from {}&lt;Target={}&gt;",
4430+
"<a class=\"sidebar-title\" href=\"#{}\">Methods from {}&lt;Target={}&gt;</a>",
4431+
id,
44324432
Escape(&format!("{:#}", impl_.inner_impl().trait_.as_ref().unwrap().print())),
4433-
Escape(&format!("{:#}", real_target.print()))
4433+
Escape(&format!("{:#}", real_target.print())),
44344434
));
4435-
out.push_str("</a>");
44364435
// We want links' order to be reproducible so we don't use unstable sort.
44374436
ret.sort();
44384437
out.push_str(&format!("<div class=\"sidebar-links\">{}</div>", ret.join("")));

0 commit comments

Comments
 (0)