Skip to content

Commit

Permalink
Allow to build HistoryItemId values from the outside (#677)
Browse files Browse the repository at this point in the history
* Allow to build HistoryItemId values from the outside

* Fix: add missing documentation on HistoryItemId::new
  • Loading branch information
ClementNerma authored Dec 6, 2023
1 parent 07b7f6b commit ca2f6c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/history/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit ca2f6c8

Please sign in to comment.