Skip to content

Commit

Permalink
Rollup merge of rust-lang#133398 - klensy:rd-to-string, r=aDotInTheVoid
Browse files Browse the repository at this point in the history
rustdoc: do not call to_string, it's already impl Display

`anchor` returns impl Display, so no need to call to_string().
  • Loading branch information
matthiaskrgr authored Nov 24, 2024
2 parents 220251e + da4c050 commit e87e205
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ impl clean::Impl {
self.print_type(inner_type, f, use_absolute, cx)?;
write!(f, ">")?;
} else {
write!(f, "{}<", anchor(ty.def_id(), last, cx).to_string())?;
write!(f, "{}<", anchor(ty.def_id(), last, cx))?;
self.print_type(inner_type, f, use_absolute, cx)?;
write!(f, ">")?;
}
Expand Down

0 comments on commit e87e205

Please sign in to comment.