diff options
author | Radyk Andrii <ander.ender@gmail.com> | 2019-12-28 22:26:18 +0100 |
---|---|---|
committer | Radyk Andrii <ander.ender@gmail.com> | 2019-12-29 21:29:32 +0100 |
commit | edb263220868491c93c466021f5dd8010d324026 (patch) | |
tree | bc6903d44d809b16234f04c20f822870fb139e55 /src | |
parent | 1e39a2805d125dd55fa8e24aa9afdc1c8350094d (diff) | |
download | nix-edb263220868491c93c466021f5dd8010d324026.zip |
remove deprecated Error::description
Diffstat (limited to 'src')
-rw-r--r-- | src/errno.rs | 6 | ||||
-rw-r--r-- | src/lib.rs | 11 |
2 files changed, 2 insertions, 15 deletions
diff --git a/src/errno.rs b/src/errno.rs index 287bbea4..a8a2bf24 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 { @@ -152,16 +152,7 @@ impl From<std::string::FromUtf8Error> 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 { |