summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraelita-mergebot <michaelhowell932+aelita@gmail.com>2016-09-22 05:34:33 -0700
committerGitHub <noreply@github.com>2016-09-22 05:34:33 -0700
commit87e0352ead8383631428778f6384c2ae426e36b6 (patch)
tree097ced828c7034f9aa9c44ce11cbb175a36d2e60 /src
parentc75cccbb0395060a1e2c11272a64e9fb09697cc0 (diff)
parentf553c4e08f11c18ef03fdacfcfaaea4771a13b4e (diff)
Add support for boolean values
Merge #5 a=@mre r=@nox ________________________________________________________________________
Diffstat (limited to 'src')
-rw-r--r--src/ser/value.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ser/value.rs b/src/ser/value.rs
index 7a2ac42..d017242 100644
--- a/src/ser/value.rs
+++ b/src/ser/value.rs
@@ -51,8 +51,8 @@ impl<'key, 'target, Target> Serializer
type StructState = ();
type StructVariantState = ();
- fn serialize_bool(&mut self, _v: bool) -> Result<(), Error> {
- Err(Error::unsupported_value())
+ fn serialize_bool(&mut self, v: bool) -> Result<(), Error> {
+ self.append_pair(if v { "true" } else { "false" })
}
fn serialize_isize(&mut self, v: isize) -> Result<(), Error> {