migrate to this error

it doesn't generate a bazillion warning at compile time
This commit is contained in:
trinity-1686a
2025-11-01 17:20:39 +01:00
parent 2e7a6fccba
commit 1fe932d07f
25 changed files with 177 additions and 214 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ readme = "../../README.md"
path = "lib.rs"
[dependencies]
err-derive.workspace = true
thiserror.workspace = true
tracing.workspace = true
heed = { workspace = true, optional = true }
+3 -3
View File
@@ -20,7 +20,7 @@ use std::cell::Cell;
use std::path::PathBuf;
use std::sync::Arc;
use err_derive::Error;
use thiserror::Error;
pub use open::*;
@@ -44,7 +44,7 @@ pub type TxValueIter<'a> = Box<dyn std::iter::Iterator<Item = TxOpResult<(Value,
// ----
#[derive(Debug, Error)]
#[error(display = "{}", _0)]
#[error("{0}")]
pub struct Error(pub Cow<'static, str>);
impl From<std::io::Error> for Error {
@@ -56,7 +56,7 @@ impl From<std::io::Error> for Error {
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, Error)]
#[error(display = "{}", _0)]
#[error("{0}")]
pub struct TxOpError(pub(crate) Error);
pub type TxOpResult<T> = std::result::Result<T, TxOpError>;