We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
write!
1 parent 74147b8 commit d18936aCopy full SHA for d18936a
src/librustdoc/html/length_limit.rs
@@ -79,17 +79,13 @@ impl HtmlWithLimit {
79
/// Close the most recently opened HTML tag.
80
pub(super) fn close_tag(&mut self) {
81
let tag_name = self.unclosed_tags.pop().unwrap();
82
- self.buf.push_str("</");
83
- self.buf.push_str(tag_name);
84
- self.buf.push('>');
+ write!(self.buf, "</{}>", tag_name).unwrap();
85
}
86
87
/// Write all queued tags and add them to the `unclosed_tags` list.
88
fn flush_queue(&mut self) {
89
for tag_name in self.queued_tags.drain(..) {
90
- self.buf.push('<');
91
92
+ write!(self.buf, "<{}>", tag_name).unwrap();
93
94
self.unclosed_tags.push(tag_name);
95
0 commit comments