diff options
author | Aleksey Ivanov <ialexxei@gmail.com> | 2018-04-09 20:03:07 +0300 |
---|---|---|
committer | Aleksey Ivanov <ialexxei@gmail.com> | 2018-04-09 21:40:34 +0300 |
commit | 7ba954942ab9acd8b658636cf775c4360ec76272 (patch) | |
tree | 4d55b16a9c7270c7e0b17afaf20a7b213d24e00b /src | |
parent | e8fa9fee96185ddd18ebcef8a925c75459111edb (diff) |
[Close #70] Support newtype struct deserialization
Diffstat (limited to 'src')
-rw-r--r-- | src/de.rs | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -224,9 +224,16 @@ impl<'de> de::Deserializer<'de> for Value { } } + fn deserialize_newtype_struct<V>(self, _name: &'static str, visitor: V) -> Result<V::Value> + where + V: de::Visitor<'de> + { + visitor.visit_newtype_struct(self) + } + forward_to_deserialize_any! { char seq - bytes byte_buf map struct unit enum newtype_struct + bytes byte_buf map struct unit enum identifier ignored_any unit_struct tuple_struct tuple } } |