From 1faf3a1db661c7fb1f3a9a141efa30fb67e9ab3a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 4 Sep 2024 15:27:48 -0700 Subject: [PATCH] Replace bool::to_string with if --- src/value/ser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/value/ser.rs b/src/value/ser.rs index d1f5387d3..a68193437 100644 --- a/src/value/ser.rs +++ b/src/value/ser.rs @@ -486,7 +486,7 @@ impl serde::Serializer for MapKeySerializer { } fn serialize_bool(self, value: bool) -> Result { - Ok(value.to_string()) + Ok(if value { "true" } else { "false" }.to_owned()) } fn serialize_i8(self, value: i8) -> Result {