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 direct support for i128 and u128 via itoa #940

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

Lucretiel
Copy link
Contributor

itoa natively and unconditionally supports i128 and u128, so we can use it instead of to_string on those types.

This change should have no publicly visible behavior changes. It was previously impossible to customize behavior for 128 bit ints in Formatter, so there aren't any public facing behavior changes introduced by the addition of new methods to Formatter.

The MSRV for serde_json is 1.36, so there should be no need to conditionally compile anything in this MR. This is affirmed by the itoa dependency, which unconditionally supports 128 bit integers.

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.

Thanks!

@dtolnay dtolnay merged commit 486598b into serde-rs:master Oct 19, 2022
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