diff --git a/src/bson.rs b/src/bson.rs index 40717759..ee652725 100644 --- a/src/bson.rs +++ b/src/bson.rs @@ -605,7 +605,7 @@ pub struct TimeStamp { /// date_time: UtcDateTime, /// } /// ``` -#[derive(Debug, Eq, PartialEq, Copy, Clone)] +#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Copy, Clone)] pub struct UtcDateTime(pub DateTime); impl Deref for UtcDateTime { @@ -622,9 +622,9 @@ impl DerefMut for UtcDateTime { } } -impl Into> for UtcDateTime { - fn into(self) -> DateTime { - self.0 +impl From for DateTime { + fn from(utc: UtcDateTime) -> Self { + utc.0 } }