Added support for newtype variant serialization

This commit is contained in:
Armin Ronacher
2018-03-18 13:10:54 +01:00
parent ebc61baab2
commit f1af2dc5ab
2 changed files with 54 additions and 2 deletions
+2 -2
View File
@@ -1164,12 +1164,12 @@ impl<'a, M> Serializer for FlatMapSerializer<'a, M>
_: &'static str,
_: u32,
_: &'static str,
_: &T,
value: &T,
) -> Result<Self::Ok, Self::Error>
where
T: Serialize,
{
Err(self.bad_type(Unsupported::Enum))
value.serialize(self)
}
fn serialize_seq(self, _: Option<usize>) -> Result<Self::SerializeSeq, Self::Error> {