From 01e32dae88ccd2e580b1b3b4f156901482e4d42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Nerma?= Date: Sat, 11 Nov 2023 23:04:55 +0100 Subject: [PATCH] Add more derive impl for HistoryItemId (#662) --- src/history/item.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/history/item.rs b/src/history/item.rs index 355104b9..ec477bbc 100644 --- a/src/history/item.rs +++ b/src/history/item.rs @@ -5,7 +5,7 @@ use serde::{de::DeserializeOwned, Deserialize, Serialize}; use std::{fmt::Display, time::Duration}; /// Unique ID for the [`HistoryItem`]. More recent items have higher ids than older ones. -#[derive(Debug, Copy, Clone, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct HistoryItemId(pub(crate) i64); impl HistoryItemId { pub(crate) const fn new(i: i64) -> HistoryItemId {