Fix a couple errors in DateStrEmitter (#368)

This commit is contained in:
Michael Sloan 2020-01-15 09:58:12 -07:00 committed by Alex Crichton
parent 96cb061bec
commit 13107f621b

View file

@ -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> {