Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 128 bit HashMap key serialization #1188

Merged

Conversation

Mrreadiness
Copy link
Contributor

Now HashMap doesn't support i128/u128 key serialization (deserialization works).
Example of code:

let mut b = HashMap::new();
b.insert(0_i128, String::new());
serde_json::to_value(b).unwrap();

Error:

Error("i128 is not supported", line: 0, column: 0)

I don't find any reason why. So I added the missing methods.

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@dtolnay dtolnay merged commit 599228d into serde-rs:master Sep 4, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants