1
Fork 0

Rollup merge of #133398 - klensy:rd-to-string, r=aDotInTheVoid

rustdoc: do not call to_string, it's already impl Display

`anchor` returns impl Display, so no need to call to_string().
This commit is contained in:
Matthias Krüger 2024-11-24 11:08:20 +01:00 committed by GitHub
commit e87e205010
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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