Skip to content

Commit e86db16

Browse files
committed
Update Error to comply to rust >= 1.42
1 parent 554acf0 commit e86db16

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/result.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,8 @@ impl fmt::Display for Error {
4444
}
4545

4646
impl error::Error for Error {
47-
fn description(&self) -> &str {
48-
match *self {
49-
Error::NewContext(ref err) => err.description(),
50-
Error::InitContext(ref err) => err.description(),
51-
Error::Io(ref err) => err.description(),
52-
Error::NulInPath(ref err) => err.description(),
53-
}
54-
}
5547

56-
fn cause(&self) -> Option<&error::Error> {
48+
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
5749
match *self {
5850
Error::NewContext(ref err) => Some(err),
5951
Error::InitContext(ref err) => Some(err),

0 commit comments

Comments
 (0)