Skip to content

Commit 239d25d

Browse files
authored
Merge pull request #1090 from Xanewok/deprecated-description
metadata: Don't use deprecated Error::description
2 parents a6f8c8b + a4982d9 commit 239d25d

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

metadata/src/lib.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::fmt;
1313
use std::io;
1414
use std::path::{Path, PathBuf};
1515
use std::process::Command;
16-
use std::str::{self, Utf8Error};
16+
use std::str::Utf8Error;
1717

1818
#[derive(Debug)]
1919
pub enum ErrorKind {
@@ -34,16 +34,7 @@ impl fmt::Display for ErrorKind {
3434
}
3535
}
3636

37-
impl Error for ErrorKind {
38-
fn description(&self) -> &str {
39-
match self {
40-
ErrorKind::Encode(e) => e.description(),
41-
ErrorKind::Json(e) => e.description(),
42-
ErrorKind::Io(e) => e.description(),
43-
ErrorKind::Subprocess(s) => &s,
44-
}
45-
}
46-
}
37+
impl Error for ErrorKind {}
4738

4839
impl From<Utf8Error> for ErrorKind {
4940
fn from(e: Utf8Error) -> ErrorKind {

0 commit comments

Comments
 (0)