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.
PadAdapter::write_char
1 parent d7229c4 commit ad3da83Copy full SHA for ad3da83
library/core/src/fmt/builders.rs
@@ -40,6 +40,14 @@ impl fmt::Write for PadAdapter<'_, '_> {
40
41
Ok(())
42
}
43
+
44
+ fn write_char(&mut self, c: char) -> fmt::Result {
45
+ if self.state.on_newline {
46
+ self.buf.write_str(" ")?;
47
+ }
48
+ self.state.on_newline = c == '\n';
49
+ self.buf.write_char(c)
50
51
52
53
/// A struct to help with [`fmt::Debug`](Debug) implementations.
0 commit comments