aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Sloan <mgsloan@gmail.com>2020-01-15 09:58:12 -0700
committerAlex Crichton <alex@alexcrichton.com>2020-01-15 10:58:12 -0600
commitf92c15f1b88937f58b356ebdf1d95c32e818fef9 (patch)
treeda77d767a8510dfa047de35e1ed44794b0e613b4 /src
parent1b8e0d78bd208fc566fc5d627b3c3147e64113b1 (diff)
downloadmilf-rs-f92c15f1b88937f58b356ebdf1d95c32e818fef9.tar.gz
milf-rs-f92c15f1b88937f58b356ebdf1d95c32e818fef9.zip
Fix a couple errors in DateStrEmitter (#368)
Diffstat (limited to 'src')
-rw-r--r--src/ser.rs4
1 files 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> {