Allow to build HistoryItemId values from the outside (#677)

* Allow to build HistoryItemId values from the outside

* Fix: add missing documentation on HistoryItemId::new
This commit is contained in:
Clément Nerma 2023-12-06 14:25:50 +01:00 committed by GitHub
parent 07b7f6bb76
commit ca2f6c8c10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,9 +6,11 @@ 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, PartialOrd, Ord, Hash)]
pub struct HistoryItemId(pub(crate) i64);
pub struct HistoryItemId(pub i64);
impl HistoryItemId {
pub(crate) const fn new(i: i64) -> HistoryItemId {
/// Create a new `HistoryItemId` value
pub const fn new(i: i64) -> HistoryItemId {
HistoryItemId(i)
}
}