Fix a couple errors in DateStrEmitter (#368)

master
Michael Sloan 2020-01-15 09:58:12 -07:00 committed by Alex Crichton
parent 1b8e0d78bd
commit f92c15f1b8
1 changed files with 2 additions and 2 deletions

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