librustdoc: impl core::fmt::Write for rustdoc::html::render::Buffer
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
This commit is contained in:
parent
93e8201ca7
commit
95bd87f849
1 changed files with 6 additions and 0 deletions
|
@ -64,6 +64,12 @@ crate struct Buffer {
|
|||
buffer: String,
|
||||
}
|
||||
|
||||
impl core::fmt::Write for Buffer {
|
||||
fn write_str(&mut self, s: &str) -> fmt::Result {
|
||||
self.buffer.write_str(s)
|
||||
}
|
||||
}
|
||||
|
||||
impl Buffer {
|
||||
crate fn empty_from(v: &Buffer) -> Buffer {
|
||||
Buffer { for_html: v.for_html, buffer: String::new() }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue