Skip to content

Commit

Permalink
add missing error reexports.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed May 14, 2024
1 parent 818d8df commit 571a9c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::file::SearchSeekError;
use crate::page::ReadError as PageReadError;

/// Error returned by [`ReadTransaction::read_all`](crate::ReadTransaction::read_all), [`ReadTransaction::read_range`](crate::ReadTransaction::read_range).
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Error<E> {
Expand Down Expand Up @@ -147,7 +148,7 @@ impl<E> From<Error<E>> for CursorError<E> {
/// Database is corrupted, or not formatted yet.
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct CorruptedError;
pub(crate) struct CorruptedError;

impl<E> From<CorruptedError> for Error<E> {
fn from(_: CorruptedError) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub mod flash;
mod types;

pub use cursor::Cursor;
pub use errors::{CommitError, FormatError, MountError, ReadError, WriteError};
pub use errors::*;
pub use record::{Config, Database, ReadTransaction, WriteTransaction};

#[cfg(feature = "_test")]
Expand Down

0 comments on commit 571a9c8

Please sign in to comment.