rkyv/impls/std/
time.rs

1use crate::time::ArchivedDuration;
2use std::time::Duration;
3
4impl PartialEq<Duration> for ArchivedDuration {
5    #[inline]
6    fn eq(&self, other: &Duration) -> bool {
7        self.as_nanos() == other.as_nanos() && self.as_secs() == other.as_secs()
8    }
9}
10
11impl PartialEq<ArchivedDuration> for Duration {
12    #[inline]
13    fn eq(&self, other: &ArchivedDuration) -> bool {
14        other.eq(self)
15    }
16}