Skip to content

Commit

Permalink
remove deprecated Error::description
Browse files Browse the repository at this point in the history
  • Loading branch information
AnderEnder committed Dec 28, 2019
1 parent 1e39a28 commit 9dd3854
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
6 changes: 1 addition & 5 deletions src/errno.rs
Expand Up @@ -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 {
Expand Down
11 changes: 1 addition & 10 deletions src/lib.rs
Expand Up @@ -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 {
Expand Down

0 comments on commit 9dd3854

Please sign in to comment.