diff options
author | Alex Crichton <alex@alexcrichton.com> | 2017-07-06 11:43:36 -0700 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2017-07-06 11:43:36 -0700 |
commit | f6673dfdb3f93bacfbf0c0cab4d78bc4154eec0c (patch) | |
tree | 161ce3d1c582ef27969dca3b3c5f23de1d0d87d7 /src | |
parent | ad5bd8758e60fc918423bbbf3dedf04037487d62 (diff) | |
download | milf-rs-f6673dfdb3f93bacfbf0c0cab4d78bc4154eec0c.tar.gz milf-rs-f6673dfdb3f93bacfbf0c0cab4d78bc4154eec0c.zip |
One more case of handling newtype structs
Diffstat (limited to 'src')
-rw-r--r-- | src/de.rs | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -438,9 +438,19 @@ impl<'de, 'b> de::Deserializer<'de> for MapVisitor<'de, 'b> { visitor.visit_some(self) } + fn deserialize_newtype_struct<V>( + self, + _name: &'static str, + visitor: V + ) -> Result<V::Value, Error> + where V: de::Visitor<'de> + { + visitor.visit_newtype_struct(self) + } + forward_to_deserialize_any! { bool u8 u16 u32 u64 i8 i16 i32 i64 f32 f64 char str string seq - bytes byte_buf map struct unit newtype_struct identifier + bytes byte_buf map struct unit identifier ignored_any unit_struct tuple_struct tuple enum } } |