From 099d7b66836bc994b26e78b4066f28f32b82ffe9 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 24 Apr 2017 21:48:02 +0900 Subject: Allow to deserialize/serialize into enums Close #164 --- src/ser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ser.rs') diff --git a/src/ser.rs b/src/ser.rs index e4b62f7..2365b38 100644 --- a/src/ser.rs +++ b/src/ser.rs @@ -423,7 +423,7 @@ impl<'a, 'b> ser::Serializer for &'b mut Serializer<'a> { _variant_index: u32, _variant: &'static str) -> Result<(), Self::Error> { - Err(Error::UnsupportedType) + self.serialize_str(_variant) } fn serialize_newtype_struct(self, _name: &'static str, value: &T) -- cgit v1.2.3