Skip to content

Commit

Permalink
Merge pull request #1188 from Mrreadiness/feat/add-hashmap-key-128-se…
Browse files Browse the repository at this point in the history
…rializer

Add support for 128 bit HashMap key serialization
  • Loading branch information
dtolnay authored Sep 4, 2024
2 parents 27a4ca9 + 5416cee commit 599228d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/value/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,10 @@ impl serde::Serializer for MapKeySerializer {
Ok(value.to_string())
}

fn serialize_i128(self, value: i128) -> Result<String> {
Ok(value.to_string())
}

fn serialize_u8(self, value: u8) -> Result<String> {
Ok(value.to_string())
}
Expand All @@ -521,6 +525,10 @@ impl serde::Serializer for MapKeySerializer {
Ok(value.to_string())
}

fn serialize_u128(self, value: u128) -> Result<String> {
Ok(value.to_string())
}

fn serialize_f32(self, value: f32) -> Result<String> {
if value.is_finite() {
Ok(ryu::Buffer::new().format_finite(value).to_owned())
Expand Down

0 comments on commit 599228d

Please sign in to comment.