Skip to content

Commit

Permalink
Merge branch 'main' into patch-5
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementNerma authored Dec 6, 2023
2 parents d4e9132 + ca2f6c8 commit 9079f6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/history/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ 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, Serialize, Deserialize)]
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
4 changes: 2 additions & 2 deletions src/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use thiserror::Error;

/// non-public (for now)
#[derive(Error, Debug)]
pub(crate) enum ReedlineErrorVariants {
pub enum ReedlineErrorVariants {
// todo: we should probably be more specific here
#[cfg(any(feature = "sqlite", feature = "sqlite-dynlib"))]
#[error("error within history database: {0}")]
Expand All @@ -21,7 +21,7 @@ pub(crate) enum ReedlineErrorVariants {

/// separate struct to not expose anything to the public (for now)
#[derive(Debug)]
pub struct ReedlineError(pub(crate) ReedlineErrorVariants);
pub struct ReedlineError(pub ReedlineErrorVariants);

impl Display for ReedlineError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
Expand Down

0 comments on commit 9079f6c

Please sign in to comment.