Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove deprecated Error::description
  • Loading branch information
AnderEnder committed Jan 3, 2020
commit 64735f0ccd8ff47d5796130d1ecb7563349cde26
11 changes: 1 addition & 10 deletions src/decoder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,7 @@ impl fmt::Display for DecoderError {
}
}

impl Error for DecoderError {
fn description(&self) -> &str {
use self::DecoderError::*;
match *self {
DecodeNotImplemented(ref s) | DeserializerError(ref s) | ParseError(ref s) => s,
IoError(ref e) => e.description(),
NoFieldName => "No field name",
}
}
}
impl Error for DecoderError {}

impl From<io::Error> for DecoderError {
fn from(err: io::Error) -> DecoderError {
Expand Down
11 changes: 1 addition & 10 deletions src/encoder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,7 @@ impl fmt::Display for EncoderError {
}
}

impl Error for EncoderError {
fn description(&self) -> &str {
use self::EncoderError::*;
match *self {
EncodeNotImplemented(ref s) | SerializerError(ref s) => s,
IoError(ref e) => e.description(),
NoFieldName => "No field name",
}
}
}
impl Error for EncoderError {}

pub type EncodeResult<T> = Result<T, EncoderError>;

Expand Down