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.
1 parent 5fffe00 commit 914d4e7Copy full SHA for 914d4e7
src/lib.rs
@@ -327,10 +327,18 @@ where
327
328
// Time.
329
330
- self.timer
331
- .format_time(&mut event_buf)
332
- .expect("Unable to write time to buffer");
333
- write!(event_buf, " ").expect("Unable to write to buffer");
+ {
+ let prev_buffer_len = event_buf.len();
+
+ self.timer
334
+ .format_time(&mut event_buf)
335
+ .expect("Unable to write time to buffer");
336
337
+ // Something was written to the buffer, pad it with a space.
338
+ if prev_buffer_len < event_buf.len() {
339
+ write!(event_buf, " ").expect("Unable to write to buffer");
340
+ }
341
342
343
// printing the indentation
344
let indent = ctx
0 commit comments