From b9507d859d27d68b954a76202e60c5cf50c5604d Mon Sep 17 00:00:00 2001 From: Andrii Radyk Date: Sun, 22 Dec 2019 00:06:00 +0100 Subject: remove deprecated Error::description --- src/ser.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/ser.rs') diff --git a/src/ser.rs b/src/ser.rs index d81f75e..fd72930 100644 --- a/src/ser.rs +++ b/src/ser.rs @@ -1542,22 +1542,7 @@ impl fmt::Display for Error { } } -impl error::Error for Error { - fn description(&self) -> &str { - match *self { - Error::UnsupportedType => "unsupported Rust type", - Error::KeyNotString => "map key was not a string", - Error::ValueAfterTable => "values must be emitted before tables", - Error::DateInvalid => "a serialized date was invalid", - Error::NumberInvalid => "a serialized number was invalid", - Error::UnsupportedNone => "unsupported None value", - Error::Custom(_) => "custom error", - Error::KeyNewline => unreachable!(), - Error::ArrayMixedType => unreachable!(), - Error::__Nonexhaustive => panic!(), - } - } -} +impl error::Error for Error {} impl ser::Error for Error { fn custom(msg: T) -> Error { -- cgit v1.2.3