From f5b1ae88282adfc2fe2253e4cd51c6ba5eca0c54 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Sun, 29 Jan 2017 00:17:54 +0100 Subject: Do not forbid bool keys anymore Floats are supported so... --- src/ser/part.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/ser/part.rs') 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 PartSerializer { pub trait Sink: Sized { type Ok; - fn serialize_bool(self, value: bool) -> Result; - fn serialize_static_str(self, value: &'static str) -> Result; @@ -48,7 +46,7 @@ impl ser::Serializer for PartSerializer { type SerializeStructVariant = VoidSerializer; fn serialize_bool(self, v: bool) -> Result { - self.sink.serialize_bool(v) + self.sink.serialize_static_str(if v { "true" } else { "false" }) } fn serialize_i8(self, v: i8) -> Result { -- cgit v1.2.3