diff --git a/src/duration.rs b/src/duration.rs index d7b8e86..d924ce6 100644 --- a/src/duration.rs +++ b/src/duration.rs @@ -634,7 +634,7 @@ impl Duration { impl PartialEq for Duration { fn eq(&self, other: &time::Duration) -> bool { - self.0.map_or(false, |this| this == *other) + self.0 == Some(*other) } } diff --git a/src/instant.rs b/src/instant.rs index 142d123..b314130 100644 --- a/src/instant.rs +++ b/src/instant.rs @@ -160,7 +160,7 @@ impl Instant { impl PartialEq for Instant { fn eq(&self, other: &time::Instant) -> bool { - self.0.map_or(false, |this| this == *other) + self.0 == Some(*other) } }