Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/imp/openssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ impl error::Error for Error {
}
}

fn cause(&self) -> Option<&error::Error> {
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
match *self {
Error::Normal(ref e) => error::Error::cause(e),
Error::Ssl(ref e, _) => error::Error::cause(e),
Error::Normal(ref e) => Some(e),
Error::Ssl(ref e, _) => Some(e),
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,13 @@ impl error::Error for Error {
error::Error::description(&self.0)
}

fn cause(&self) -> Option<&error::Error> {
fn cause(&self) -> Option<&dyn error::Error> {
error::Error::cause(&self.0)
}

fn source(&self) -> Option<&(dyn error::Error + 'static)> {
error::Error::source(&self.0)
}
}

impl fmt::Display for Error {
Expand Down