Skip to content

Commit

Permalink
Replace bool::to_string with if
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Sep 4, 2024
1 parent dad3195 commit a43c328
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/value/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit a43c328

Please sign in to comment.