From 571a9c8863e9644682ebd41343eaf0444ea4bf87 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Tue, 14 May 2024 17:54:04 +0200 Subject: [PATCH] add missing error reexports. --- src/errors.rs | 3 ++- src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/errors.rs b/src/errors.rs index 88b0f71..cbf8c99 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -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 { @@ -147,7 +148,7 @@ impl From> for CursorError { /// 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 From for Error { fn from(_: CorruptedError) -> Self { diff --git a/src/lib.rs b/src/lib.rs index 1fc1c7b..f749d2c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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")]