From b2a427ee7df39d27e86348fbb3f4e79cf2074d41 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Wed, 4 Sep 2019 17:44:32 -0600 Subject: 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. --- src/de.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/de.rs b/src/de.rs index f9a3a4c..e290b19 100644 --- a/src/de.rs +++ b/src/de.rs @@ -81,12 +81,12 @@ where } /// Errors that can occur when deserializing a type. -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, PartialEq, Eq, Clone)] pub struct Error { inner: Box, } -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, PartialEq, Eq, Clone)] struct ErrorInner { kind: ErrorKind, line: Option, @@ -97,7 +97,7 @@ struct ErrorInner { } /// Errors that can occur when deserializing a type. -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, PartialEq, Eq, Clone)] enum ErrorKind { /// EOF was reached when looking for a value UnexpectedEof, -- cgit v1.2.3