aboutsummaryrefslogtreecommitdiff
path: root/src/value.rs
diff options
context:
space:
mode:
authorVincent Prouillet <vincent@wearewizards.io>2017-04-24 21:48:02 +0900
committerVincent Prouillet <vincent@wearewizards.io>2017-04-24 22:13:38 +0900
commit099d7b66836bc994b26e78b4066f28f32b82ffe9 (patch)
treeac91ac55ae3f119165c1b4425754e5de76c763fa /src/value.rs
parent9942435bbcd6a41bf39bd298e93b7b57aaa87b6d (diff)
downloadmilf-rs-099d7b66836bc994b26e78b4066f28f32b82ffe9.tar.gz
milf-rs-099d7b66836bc994b26e78b4066f28f32b82ffe9.zip
Allow to deserialize/serialize into enums
Close #164
Diffstat (limited to 'src/value.rs')
-rw-r--r--src/value.rs2
1 files changed, 1 insertions, 1 deletions
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<Value, ::ser::Error> {
- Err(::ser::Error::UnsupportedType)
+ self.serialize_str(_variant)
}
fn serialize_newtype_struct<T: ?Sized>(self,