diff options
author | Steven Pease <peasteven@gmail.com> | 2018-10-27 18:28:18 -0700 |
---|---|---|
committer | Steven Pease <peasteven@gmail.com> | 2018-10-27 18:28:18 -0700 |
commit | 88470e2452b9825ace87ebe2b686a4f93c050e57 (patch) | |
tree | 3792c458ca2fbff3d53c7113f81b3051b849b7e0 /src | |
parent | 3aec5a918a6cb39fa32e8a56725a3c2fc0ed6bc2 (diff) | |
download | milf-rs-88470e2452b9825ace87ebe2b686a4f93c050e57.tar.gz milf-rs-88470e2452b9825ace87ebe2b686a4f93c050e57.zip |
Allow newtype key
Diffstat (limited to 'src')
-rw-r--r-- | src/ser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1420,11 +1420,11 @@ impl ser::Serializer for StringExtractor { Err(Error::KeyNotString) } - fn serialize_newtype_struct<T: ?Sized>(self, _name: &'static str, _value: &T) + fn serialize_newtype_struct<T: ?Sized>(self, _name: &'static str, value: &T) -> Result<String, Self::Error> where T: ser::Serialize, { - Err(Error::KeyNotString) + value.serialize(self) } fn serialize_newtype_variant<T: ?Sized>(self, |