Skip to content

Commit

Permalink
Add from conversion
Browse files Browse the repository at this point in the history
This is needed for tokio-openssl
  • Loading branch information
sfackler committed Jan 11, 2018
1 parent 693ef31 commit be1e787
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions openssl/src/ssl/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ impl Error {
}
}

impl From<ErrorStack> for Error {
fn from(e: ErrorStack) -> Error {
Error {
code: ErrorCode::SSL,
cause: Some(InnerError::Ssl(e)),
}
}
}

impl fmt::Display for Error {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
match self.code {
Expand Down

0 comments on commit be1e787

Please sign in to comment.