This method allows `write!` and `writeln!` to be used directly on `CodeIndenter`. It does the same thing as using it via the `fmt::Write` trait but in a non-fallible manner. This is only allowed on `String` because it's the only type that can't fail to write.
(&mut self, args: fmt::Arguments)
| 98 | // It does the same thing as using it via the `fmt::Write` trait but in a non-fallible manner. |
| 99 | // This is only allowed on `String` because it's the only type that can't fail to write. |
| 100 | pub fn write_fmt(&mut self, args: fmt::Arguments) { |
| 101 | fmt::Write::write_fmt(self, args).unwrap() |
| 102 | } |
| 103 | } |
| 104 | pub struct IndentScope<'a, W: fmt::Write> { |
| 105 | fmt: &'a mut CodeIndenter<W>, |