Allow char to be a HashMap key

This commit is contained in:
Federico 2018-06-15 21:21:55 +02:00
parent c85963c288
commit 759d9c49c1

View File

@ -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<()> {