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/value.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/value.rs') diff --git a/src/value.rs b/src/value.rs index 7c2b3eb..f499ff6 100644 --- a/src/value.rs +++ b/src/value.rs @@ -694,7 +694,7 @@ impl ser::Serializer for Serializer { _variant_index: u32, _variant: &'static str) -> Result { - Err(::ser::Error::UnsupportedType) + self.serialize_str(_variant) } fn serialize_newtype_struct(self, -- cgit v1.2.3