From f92c15f1b88937f58b356ebdf1d95c32e818fef9 Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Wed, 15 Jan 2020 09:58:12 -0700 Subject: 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> { -- cgit v1.2.3