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

Make unreadable_literal useful even when we use numbers with two decimals #13663

Open
frederikhors opened this issue Nov 7, 2024 · 0 comments
Labels
A-lint Area: New lints

Comments

@frederikhors
Copy link

What it does

In a project there are a lot of numbers like this: 12345678900 which means 123456789.00, maybe because we are using rust_decimal::Decimal::new(12345678900, 2).

unreadable_literal makes me write instead: 12_345_678_900 which as you can see is misleading during the code review.

Why not also suggest 1_23_45_67_89_00, maybe changing the settings?

Advantage

No response

Drawbacks

No response

Example

<code>

Could be written as:

<code>
@frederikhors frederikhors added the A-lint Area: New lints label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints
Projects
None yet
Development

No branches or pull requests

1 participant