Pad output of `Display` on `Instant`
Zero-pad the milliseconds part of a displayed `Instant` to include three leading zeros. Closes: #297 Approved by: whitequark
This commit is contained in:
parent
4f4b209103
commit
67653fbf38
|
@ -168,7 +168,7 @@ impl Duration {
|
|||
|
||||
impl fmt::Display for Duration {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}.{}s", self.secs(), self.millis())
|
||||
write!(f, "{}.{:03}s", self.secs(), self.millis())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue