refactor(deps): replace snafu and heal anyhow (#4266)

This commit is contained in:
houseme
2026-07-05 00:31:37 +08:00
committed by GitHub
parent 86eafc799b
commit 6dabbaab4d
10 changed files with 32 additions and 68 deletions
+2 -8
View File
@@ -40,9 +40,6 @@ pub enum Error {
#[error("Other error: {0}")]
Other(String),
#[error(transparent)]
Anyhow(#[from] anyhow::Error),
#[error("Serialization error: {0}")]
Serialization(String),
@@ -94,11 +91,8 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
impl Error {
/// Create an Other error from any error type
pub fn other<E>(error: E) -> Self
where
E: Into<Box<dyn std::error::Error + Send + Sync>>,
{
Error::Other(error.into().to_string())
pub fn other(error: impl std::fmt::Display) -> Self {
Error::Other(error.to_string())
}
/// Create a transient skip error for retryable background heal checks.