mirror of
https://github.com/nushell/reedline.git
synced 2024-09-11 15:55:50 +03:00
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:
parent
07b7f6bb76
commit
ca2f6c8c10
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user