diff --git a/src/ser/mod.rs b/src/ser/mod.rs index 598b3a4..ae85ec5 100644 --- a/src/ser/mod.rs +++ b/src/ser/mod.rs @@ -72,15 +72,8 @@ impl fmt::Display for Error { } impl error::Error for Error { - fn description(&self) -> &str { - match *self { - Error::Custom(ref msg) => msg, - Error::Utf8(ref err) => error::Error::description(err), - } - } - - /// The lower-level cause of this error, in the case of a `Utf8` error. - fn cause(&self) -> Option<&error::Error> { + /// The lower-level source of this error, in the case of a `Utf8` error. + fn source(&self) -> Option<&(dyn error::Error + 'static)> { match *self { Error::Custom(_) => None, Error::Utf8(ref err) => Some(err),