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.
2 parents 4514fb9 + 814f4f6 commit 1efdb58Copy full SHA for 1efdb58
1 file changed
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