Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

Commit

Permalink
Fix a couple errors in DateStrEmitter (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsloan authored and alexcrichton committed Jan 15, 2020
1 parent 1b8e0d7 commit f92c15f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit f92c15f

Please sign in to comment.