Make de::Error
Eq
in addition to current PartialEq
(#330)
Not sure why this wasn't implemented before, since `ser::Error` has implemented `PartialEq` and `Eq` as of PR #144.
This commit is contained in:
parent
37e8b2274c
commit
57aea7dfad
|
@ -81,12 +81,12 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Errors that can occur when deserializing a type.
|
/// Errors that can occur when deserializing a type.
|
||||||
#[derive(Debug, PartialEq, Clone)]
|
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||||
pub struct Error {
|
pub struct Error {
|
||||||
inner: Box<ErrorInner>,
|
inner: Box<ErrorInner>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone)]
|
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||||
struct ErrorInner {
|
struct ErrorInner {
|
||||||
kind: ErrorKind,
|
kind: ErrorKind,
|
||||||
line: Option<usize>,
|
line: Option<usize>,
|
||||||
|
@ -97,7 +97,7 @@ struct ErrorInner {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Errors that can occur when deserializing a type.
|
/// Errors that can occur when deserializing a type.
|
||||||
#[derive(Debug, PartialEq, Clone)]
|
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||||
enum ErrorKind {
|
enum ErrorKind {
|
||||||
/// EOF was reached when looking for a value
|
/// EOF was reached when looking for a value
|
||||||
UnexpectedEof,
|
UnexpectedEof,
|
||||||
|
|
Loading…
Reference in a new issue