Add more derive impl for HistoryItemId (#662)

This commit is contained in:
Clément Nerma 2023-11-11 23:04:55 +01:00 committed by GitHub
parent 16ac4411f0
commit 01e32dae88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {