tor-circmgr: impl AsRef<dyn std::error::Error> for some error types

We're about to want this.
This commit is contained in:
Ian Jackson 2023-07-18 12:12:01 +01:00
parent f64997e1e1
commit dd5ceed791
2 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1 @@
ADDED: tor-circmgr: impl AsRef<dyn std::error::Error> for Error and Box<Error>

View File

@ -152,6 +152,9 @@ pub enum Error {
Bug(#[from] Bug),
}
tor_error::define_asref_dyn_std_error!(Error);
tor_error::define_asref_dyn_std_error!(Box<Error>);
impl From<futures::channel::oneshot::Canceled> for Error {
fn from(_: futures::channel::oneshot::Canceled) -> Error {
Error::PendingCanceled