From 75362d7bda4824a7c744ddcb8b1c5c2dec2c9897 Mon Sep 17 00:00:00 2001 From: Riccardo Casatta Date: Mon, 3 Apr 2023 18:51:44 +0200 Subject: [PATCH] remove deprecated Error::description impl add missing `dyn` --- src/error.rs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/error.rs b/src/error.rs index 8da0962..7a7f9c5 100644 --- a/src/error.rs +++ b/src/error.rs @@ -74,22 +74,8 @@ impl fmt::Display for Error { } impl error::Error for Error { - fn description(&self) -> &str { - match *self { - Error::StackOverflow => "recursion limit reached", - Error::InvalidUriChar(_) => "invalid character in URI", - Error::BadDigestTag(_) => "invalid digest tag", - Error::BadOpTag(_) => "invalid op tag", - Error::BadMagic(_) => "bad magic bytes, is this a timestamp file?", - Error::BadVersion(_) => "timestamp version not understood", - Error::BadLength { .. } => "length out of bounds", - Error::TrailingBytes => "expected eof not", - Error::Utf8(ref e) => error::Error::description(e), - Error::Io(ref e) => error::Error::description(e) - } - } - fn cause(&self) -> Option<&error::Error> { + fn cause(&self) -> Option<&dyn error::Error> { match *self { Error::Utf8(ref e) => Some(e), Error::Io(ref e) => Some(e),