From e86db16840ab1f17e42620d78e5ce7a00b4ccee7 Mon Sep 17 00:00:00 2001 From: Michael Doronin Date: Wed, 28 Oct 2020 16:03:11 +0300 Subject: [PATCH] Update Error to comply to rust >= 1.42 --- src/result.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/result.rs b/src/result.rs index fd0cc04..495bc0f 100644 --- a/src/result.rs +++ b/src/result.rs @@ -44,16 +44,8 @@ impl fmt::Display for Error { } impl error::Error for Error { - fn description(&self) -> &str { - match *self { - Error::NewContext(ref err) => err.description(), - Error::InitContext(ref err) => err.description(), - Error::Io(ref err) => err.description(), - Error::NulInPath(ref err) => err.description(), - } - } - fn cause(&self) -> Option<&error::Error> { + fn source(&self) -> Option<&(dyn error::Error + 'static)> { match *self { Error::NewContext(ref err) => Some(err), Error::InitContext(ref err) => Some(err),