diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-01-29 00:17:54 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-01-29 10:22:40 +0100 |
commit | f5b1ae88282adfc2fe2253e4cd51c6ba5eca0c54 (patch) | |
tree | 0c3c629ff2d35085f4d8ad16e3ae4e84b57a6804 /src/ser/part.rs | |
parent | 5625c254e55c767a1ec0235219c232f53dcf9e96 (diff) |
Do not forbid bool keys anymore
Floats are supported so...
Diffstat (limited to 'src/ser/part.rs')
-rw-r--r-- | src/ser/part.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ser/part.rs b/src/ser/part.rs index 049bacd..e720314 100644 --- a/src/ser/part.rs +++ b/src/ser/part.rs @@ -18,8 +18,6 @@ impl<S: Sink> PartSerializer<S> { pub trait Sink: Sized { type Ok; - fn serialize_bool(self, value: bool) -> Result<Self::Ok, Error>; - fn serialize_static_str(self, value: &'static str) -> Result<Self::Ok, Error>; @@ -48,7 +46,7 @@ impl<S: Sink> ser::Serializer for PartSerializer<S> { type SerializeStructVariant = VoidSerializer<S::Ok>; fn serialize_bool(self, v: bool) -> Result<S::Ok, Error> { - self.sink.serialize_bool(v) + self.sink.serialize_static_str(if v { "true" } else { "false" }) } fn serialize_i8(self, v: i8) -> Result<S::Ok, Error> { |