Skip to content

Commit

Permalink
Merge pull request #52 from moia-oss/hack/add-duration-debug
Browse files Browse the repository at this point in the history
custom `impl Debug` for `Duration`
  • Loading branch information
jankeu authored Dec 14, 2023
2 parents d05befe + 2cf9a5f commit b1840b7
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 b1840b7

Please sign in to comment.