diff options
author | Alex Crichton <alex@alexcrichton.com> | 2018-10-29 09:57:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-29 09:57:55 -0700 |
commit | f610ef33f4c12e363945ad3c80a1129b0389a699 (patch) | |
tree | 296224178e6eb4e2b3a40579974e9e93af9f480b /src | |
parent | 2a6d85b0dde5772241a2cf7e0ac8427949bc4112 (diff) | |
parent | 88470e2452b9825ace87ebe2b686a4f93c050e57 (diff) | |
download | milf-rs-f610ef33f4c12e363945ad3c80a1129b0389a699.tar.gz milf-rs-f610ef33f4c12e363945ad3c80a1129b0389a699.zip |
Merge pull request #271 from spease/allow-newtype-key
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, |