diff options
-rw-r--r-- | src/date.rs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/date.rs b/src/date.rs index c329ac3..8d41c67 100644 --- a/src/date.rs +++ b/src/date.rs @@ -1,4 +1,4 @@ -use std::cmp::{Ordering, Ord, PartialEq, PartialOrd}; +use std::cmp::{Ordering, Ord}; use std::ops::Add; use errors::EventError; @@ -9,7 +9,7 @@ use chrono::offset::Utc; use chrono_tz::{Tz, UTC}; -#[derive(Debug, Copy, Clone, Eq)] +#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq)] pub enum Date { Time(chrono::DateTime<Tz>), AllDay(chrono::Date<Tz>), @@ -109,18 +109,6 @@ impl Ord for Date { } } -impl PartialOrd for Date { - fn partial_cmp(&self, other: &Self) -> Option<Ordering> { - Some(self.cmp(other)) - } -} - -impl PartialEq for Date { - fn eq(&self, other: &Self) -> bool { - self.cmp(other) == Ordering::Equal - } -} - impl Add<Duration> for Date { type Output = Date; |