Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Commit

Permalink
Add back convertion from failure to default std error
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrii Radyk committed Dec 31, 2018
1 parent 2b5ab06 commit fc65810
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/compat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ with_std! {
}
}

impl From<Error> for Box<StdError> {
fn from(error: Error) -> Box<StdError> {
Box::new(Compat { error })
}
}

impl From<Error> for Box<StdError + Send + Sync> {
fn from(error: Error) -> Box<StdError + Send + Sync> {
Box::new(Compat { error })
Expand Down

0 comments on commit fc65810

Please sign in to comment.