diff --git a/Cargo.toml b/Cargo.toml index 46bb4f7..c912336 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,3 +15,4 @@ proc-macro2 = "1.0.69" quote = "1.0.33" syn = "2.0.38" futures = "0.3.28" +anyhow = "1.0.87" diff --git a/crates/async-dropper/Cargo.toml b/crates/async-dropper/Cargo.toml index 760e87c..17e5a7d 100644 --- a/crates/async-dropper/Cargo.toml +++ b/crates/async-dropper/Cargo.toml @@ -58,6 +58,7 @@ async-std = [ ] [dependencies] +anyhow.workspace = true async-trait.workspace = true async-std = { workspace = true, optional = true } futures.workspace = true diff --git a/crates/async-dropper/src/lib.rs b/crates/async-dropper/src/lib.rs index bf77823..0ace5a9 100644 --- a/crates/async-dropper/src/lib.rs +++ b/crates/async-dropper/src/lib.rs @@ -140,6 +140,6 @@ impl From> for AsyncDropError { // Create a impl for anyhow::Error to allow ? to be used with AsyncDropError impl From for AsyncDropError { fn from(value: anyhow::Error) -> Self { - AsyncDropError::UnexpectedError(Box::new(value)) + AsyncDropError::UnexpectedError(value.into()) } }