From 13107f621b3dc13881d235b1c18bd01c41fa5833 Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Wed, 15 Jan 2020 09:58:12 -0700 Subject: [PATCH] Fix a couple errors in DateStrEmitter (#368) --- src/ser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ser.rs b/src/ser.rs index fd72930..b4737cc 100644 --- a/src/ser.rs +++ b/src/ser.rs @@ -1262,11 +1262,11 @@ impl<'a, 'b> ser::Serializer for DateStrEmitter<'a, 'b> { where T: ser::Serialize, { - Err(Error::KeyNotString) + Err(Error::DateInvalid) } fn serialize_unit(self) -> Result<(), Self::Error> { - Err(Error::KeyNotString) + Err(Error::DateInvalid) } fn serialize_unit_struct(self, _name: &'static str) -> Result<(), Self::Error> {