mirror of
https://github.com/serde-rs/json.git
synced 2026-01-28 03:26:12 +00:00
Allow char to be a HashMap key
This commit is contained in:
parent
c85963c288
commit
759d9c49c1
@ -1140,8 +1140,8 @@ where
|
||||
Err(key_must_be_a_string())
|
||||
}
|
||||
|
||||
fn serialize_char(self, _value: char) -> Result<()> {
|
||||
Err(key_must_be_a_string())
|
||||
fn serialize_char(self, value: char) -> Result<()> {
|
||||
self.ser.serialize_str(&value.to_string())
|
||||
}
|
||||
|
||||
fn serialize_bytes(self, _value: &[u8]) -> Result<()> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user