From 9dd38541d1bc6fdf6bc920067f1a777869f2a9b2 Mon Sep 17 00:00:00 2001 From: Radyk Andrii Date: Sat, 28 Dec 2019 22:26:18 +0100 Subject: [PATCH] remove deprecated Error::description --- src/errno.rs | 6 +----- src/lib.rs | 11 +---------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/errno.rs b/src/errno.rs index 287bbea432..a8a2bf24b3 100644 --- a/src/errno.rs +++ b/src/errno.rs @@ -111,11 +111,7 @@ impl ErrnoSentinel for libc::sighandler_t { fn sentinel() -> Self { libc::SIG_ERR } } -impl error::Error for Errno { - fn description(&self) -> &str { - self.desc() - } -} +impl error::Error for Errno {} impl fmt::Display for Errno { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/src/lib.rs b/src/lib.rs index d9ba026e2e..410db18639 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -152,16 +152,7 @@ impl From for Error { fn from(_: std::string::FromUtf8Error) -> Error { Error::InvalidUtf8 } } -impl error::Error for Error { - fn description(&self) -> &str { - match *self { - Error::InvalidPath => "Invalid path", - Error::InvalidUtf8 => "Invalid UTF-8 string", - Error::UnsupportedOperation => "Unsupported Operation", - Error::Sys(ref errno) => errno.desc(), - } - } -} +impl error::Error for Error {} impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {