Skip to content

Commit

Permalink
subscriber: Remove trailing space from ChronoLocal time formatter. (#…
Browse files Browse the repository at this point in the history
…1103)

I reckon this is a bug, and @samschlegel fixed this for ChronoUtc,
but not for ChronoLocal.
  • Loading branch information
najamelan authored and hawkw committed Mar 11, 2021
1 parent 88611cb commit 9ea03f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tracing-subscriber/src/fmt/time/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ impl FormatTime for ChronoLocal {
fn format_time(&self, w: &mut dyn fmt::Write) -> fmt::Result {
let time = chrono::Local::now();
match self.format {
ChronoFmtType::Rfc3339 => write!(w, "{} ", time.to_rfc3339()),
ChronoFmtType::Custom(ref format_str) => write!(w, "{} ", time.format(format_str)),
ChronoFmtType::Rfc3339 => write!(w, "{}", time.to_rfc3339()),
ChronoFmtType::Custom(ref format_str) => write!(w, "{}", time.format(format_str)),
}
}
}
Expand Down

0 comments on commit 9ea03f1

Please sign in to comment.