From 3aa6012c7f1c48eba46a3cc4e6f015b15d59255f Mon Sep 17 00:00:00 2001 From: "Alex M. M." Date: Thu, 23 Nov 2023 00:22:10 +0100 Subject: [PATCH] Add `Hash` to `Timestamp`'s derive list --- src/model/timestamp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/timestamp.rs b/src/model/timestamp.rs index a6acc43ffca..1dd0b0a42e1 100644 --- a/src/model/timestamp.rs +++ b/src/model/timestamp.rs @@ -54,7 +54,7 @@ cfg_if::cfg_if! { /// assert_eq!(timestamp.unix_timestamp(), 1462015105); /// assert_eq!(timestamp.to_string(), "2016-04-30T11:18:25.796Z"); /// ``` - #[derive(Debug, Clone, Copy, Eq, PartialEq, Deserialize, Serialize, Ord, PartialOrd)] + #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Deserialize, Serialize, Ord, PartialOrd)] #[serde(transparent)] pub struct Timestamp(DateTime); @@ -146,7 +146,7 @@ cfg_if::cfg_if! { /// assert_eq!(timestamp.unix_timestamp(), 1462015105); /// assert_eq!(timestamp.to_string(), "2016-04-30T11:18:25.796Z"); /// ``` - #[derive(Debug, Clone, Copy, Eq, PartialEq, Deserialize, Serialize, Ord, PartialOrd)] + #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Deserialize, Serialize, Ord, PartialOrd)] #[serde(transparent)] pub struct Timestamp(#[serde(with = "rfc3339")] OffsetDateTime);