Commit be1e787c authored by Steven Fackler's avatar Steven Fackler
Browse files

Add from conversion

This is needed for tokio-openssl
parent 693ef317
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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 {