Skip to content

Commit 9dd3854

Browse files
committed
remove deprecated Error::description
1 parent 1e39a28 commit 9dd3854

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

src/errno.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,7 @@ impl ErrnoSentinel for libc::sighandler_t {
111111
fn sentinel() -> Self { libc::SIG_ERR }
112112
}
113113

114-
impl error::Error for Errno {
115-
fn description(&self) -> &str {
116-
self.desc()
117-
}
118-
}
114+
impl error::Error for Errno {}
119115

120116
impl fmt::Display for Errno {
121117
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

src/lib.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,7 @@ impl From<std::string::FromUtf8Error> for Error {
152152
fn from(_: std::string::FromUtf8Error) -> Error { Error::InvalidUtf8 }
153153
}
154154

155-
impl error::Error for Error {
156-
fn description(&self) -> &str {
157-
match *self {
158-
Error::InvalidPath => "Invalid path",
159-
Error::InvalidUtf8 => "Invalid UTF-8 string",
160-
Error::UnsupportedOperation => "Unsupported Operation",
161-
Error::Sys(ref errno) => errno.desc(),
162-
}
163-
}
164-
}
155+
impl error::Error for Error {}
165156

166157
impl fmt::Display for Error {
167158
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

0 commit comments

Comments
 (0)