Skip to content

Commit

Permalink
librustdoc: inline and forward all methods for impl Write for Buffer
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
  • Loading branch information
mfrw committed Feb 1, 2022
1 parent 95bd87f commit 66d7e50
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/librustdoc/html/format.rs
Expand Up @@ -65,9 +65,20 @@ crate struct Buffer {
}

impl core::fmt::Write for Buffer {
#[inline]
fn write_str(&mut self, s: &str) -> fmt::Result {
self.buffer.write_str(s)
}

#[inline]
fn write_char(&mut self, c: char) -> fmt::Result {
self.buffer.write_char(c)
}

#[inline]
fn write_fmt(self: &mut Self, args: fmt::Arguments<'_>) -> fmt::Result {
self.buffer.write_fmt(args)
}
}

impl Buffer {
Expand Down

0 comments on commit 66d7e50

Please sign in to comment.