aboutsummaryrefslogtreecommitdiff
path: root/src/ser.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/ser.rs
parent9942435bbcd6a41bf39bd298e93b7b57aaa87b6d (diff)
downloadmilf-rs-099d7b66836bc994b26e78b4066f28f32b82ffe9.tar.gz
milf-rs-099d7b66836bc994b26e78b4066f28f32b82ffe9.zip
Allow to deserialize/serialize into enums
Close #164
Diffstat (limited to 'src/ser.rs')
-rw-r--r--src/ser.rs2
1 files changed, 1 insertions, 1 deletions
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<T: ?Sized>(self, _name: &'static str, value: &T)