-
Notifications
You must be signed in to change notification settings - Fork 899
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 leading/trailing zeros to floats #3187
Comments
Sent a pull request to implement this. Note that Also I believe it would be nice to support different formatting styles. I came up with the following options:
|
Thanks for taking the time to look into this and for submitting a PR! I think this is a configuration rustfmt could support, and the different options you've outlined here make sense to me. I'll try to carve out some time over the next few days to review and provide feedback on your implementation 😁 |
The proposed
That said, I really appreciate having |
@Keavon Thanks for pointing this out! |
Essentially, these reformats should be done for consistency and readability:
So
1.
would become1.0
and.1
would become0.1
.The text was updated successfully, but these errors were encountered: