From dfb0c8124c085b66f58e439a14c46f0be3cf49c4 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Tue, 7 Jan 2020 14:21:17 +0100 Subject: [PATCH] remove usage of deprecated method Signed-off-by: Yoshua Wuyts --- src/io/utils.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/io/utils.rs b/src/io/utils.rs index 1b73064..0ba3ecb 100644 --- a/src/io/utils.rs +++ b/src/io/utils.rs @@ -1,5 +1,7 @@ use crate::utils::Context; +use std::{error::Error as StdError, fmt, io}; + /// Wrap `std::io::Error` with additional message /// /// Keeps the original error kind and stores the original I/O error as `source`. @@ -9,8 +11,6 @@ impl Context for Result { } } -use std::{error::Error as StdError, fmt, io}; - #[derive(Debug)] pub(crate) struct VerboseError { source: io::Error, @@ -36,10 +36,6 @@ impl fmt::Display for VerboseError { } impl StdError for VerboseError { - fn description(&self) -> &str { - self.source.description() - } - fn source(&self) -> Option<&(dyn StdError + 'static)> { Some(&self.source) }