diff options
Diffstat (limited to 'src/database/mod.rs')
-rw-r--r-- | src/database/mod.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/database/mod.rs b/src/database/mod.rs index 836d6c3..e7baaa8 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -4,8 +4,11 @@ use serde::{Deserialize, Serialize}; mod file; pub use crate::database::file::FileStorage; +#[cfg(test)] mod memory; -pub(crate) use crate::database::memory::MemoryStorage; +#[cfg(test)] +pub use crate::database::memory::MemoryStorage; + /// Data structure representing a Micropub channel in the ?q=channels output. #[derive(Serialize, Deserialize, PartialEq, Debug)] @@ -44,6 +47,8 @@ pub struct StorageError { kind: ErrorKind, } +impl warp::reject::Reject for StorageError {} + impl std::error::Error for StorageError { fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { self.source |