diff options
author | Vika <vika@fireburn.ru> | 2022-03-02 23:39:44 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2022-03-02 23:39:44 +0300 |
commit | 56e1022da6f260eb5a91e9de090b58d9dbd58cf2 (patch) | |
tree | 2227ac9560200795698ce459aab1d0155422cc0f /src/database/mod.rs | |
parent | 9c3deefd40135a4127632fb37e6b61a10949ea9f (diff) | |
download | kittybox-56e1022da6f260eb5a91e9de090b58d9dbd58cf2.tar.zst |
database: code cleanup
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 |