mirror of
https://github.com/serde-rs/json.git
synced 2025-10-02 15:26:00 +00:00
Replace bool::to_string with if
This commit is contained in:
parent
d254281184
commit
1faf3a1db6
@ -486,7 +486,7 @@ impl serde::Serializer for MapKeySerializer {
|
||||
}
|
||||
|
||||
fn serialize_bool(self, value: bool) -> Result<String> {
|
||||
Ok(value.to_string())
|
||||
Ok(if value { "true" } else { "false" }.to_owned())
|
||||
}
|
||||
|
||||
fn serialize_i8(self, value: i8) -> Result<String> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user