Skip to content

Commit 79838d4

Browse files
committed
Don’t use deprecated Error::description
1 parent 83368db commit 79838d4

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/error.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,7 @@ impl fmt::Display for Error {
5454
}
5555

5656
impl StdError for Error {
57-
fn description(&self) -> &str {
58-
match *self {
59-
Error::Format(_) => "invalid JPEG format",
60-
Error::Unsupported(_) => "unsupported JPEG feature",
61-
Error::Io(ref err) => err.description(),
62-
Error::Internal(ref err) => err.description(),
63-
}
64-
}
65-
66-
fn cause(&self) -> Option<&dyn StdError> {
57+
fn source(&self) -> Option<&(dyn StdError + 'static)> {
6758
match *self {
6859
Error::Io(ref err) => Some(err),
6960
Error::Internal(ref err) => Some(&**err),

0 commit comments

Comments
 (0)