Skip to content

Commit

Permalink
custom Debug for Duration
Browse files Browse the repository at this point in the history
  • Loading branch information
jankeu committed Dec 14, 2023
1 parent d05befe commit 2cf9a5f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,6 @@ impl TimeWindow {
PartialOrd,
Copy,
Clone,
Debug,
Default,
Hash,
Serialize,
Expand Down Expand Up @@ -1027,6 +1026,12 @@ impl Display for Duration {
}
}

impl fmt::Debug for Duration {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Display::fmt(self, f)
}
}

impl From<f64> for Duration {
fn from(num: f64) -> Self {
#[allow(clippy::cast_possible_truncation)]
Expand Down

0 comments on commit 2cf9a5f

Please sign in to comment.