From a4982d93593f48a9a1e2a6e0de9d827ef6689010 Mon Sep 17 00:00:00 2001 From: Igor Matuszewski Date: Wed, 5 Feb 2020 14:00:59 +0100 Subject: [PATCH] metadata: Don't use deprecated Error::description we will forward to `Display`, which is implemented the same way, anyway --- metadata/src/lib.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index c5a2da4b..18ef8509 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -13,7 +13,7 @@ use std::fmt; use std::io; use std::path::{Path, PathBuf}; use std::process::Command; -use std::str::{self, Utf8Error}; +use std::str::Utf8Error; #[derive(Debug)] pub enum ErrorKind { @@ -34,16 +34,7 @@ impl fmt::Display for ErrorKind { } } -impl Error for ErrorKind { - fn description(&self) -> &str { - match self { - ErrorKind::Encode(e) => e.description(), - ErrorKind::Json(e) => e.description(), - ErrorKind::Io(e) => e.description(), - ErrorKind::Subprocess(s) => &s, - } - } -} +impl Error for ErrorKind {} impl From for ErrorKind { fn from(e: Utf8Error) -> ErrorKind {