From b504b08782e96193495c55c275d681d35a31c1e2 Mon Sep 17 00:00:00 2001 From: Wangshan Lu Date: Wed, 12 Jul 2017 12:01:29 +0800 Subject: [PATCH] Fix SystemTime serde name --- serde/src/de/impls.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/serde/src/de/impls.rs b/serde/src/de/impls.rs index 694498b3..1a48f803 100644 --- a/serde/src/de/impls.rs +++ b/serde/src/de/impls.rs @@ -1426,7 +1426,7 @@ impl<'de> Deserialize<'de> for SystemTime { type Value = Duration; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("struct Duration") + formatter.write_str("struct SystemTime") } fn visit_seq(self, mut seq: A) -> Result @@ -1483,7 +1483,7 @@ impl<'de> Deserialize<'de> for SystemTime { } const FIELDS: &'static [&'static str] = &["secs_since_epoch", "nanos_since_epoch"]; - let duration = try!(deserializer.deserialize_struct("Duration", FIELDS, DurationVisitor)); + let duration = try!(deserializer.deserialize_struct("SystemTime", FIELDS, DurationVisitor)); Ok(UNIX_EPOCH + duration) } }