Skip to content

chore: 42u64 -> 42_u64#9523

Open
daniel-wong-dfinity-org wants to merge 3 commits intomasterfrom
omnibus-separate-numeric-type-suffix-daniel-wong
Open

chore: 42u64 -> 42_u64#9523
daniel-wong-dfinity-org wants to merge 3 commits intomasterfrom
omnibus-separate-numeric-type-suffix-daniel-wong

Conversation

@daniel-wong-dfinity-org
Copy link
Contributor

@daniel-wong-dfinity-org daniel-wong-dfinity-org commented Mar 20, 2026

This is done via

cargo clippy --fix \
    --all-features --all-targets --workspace \
    -- \
    --deny clippy::unseparated_literal_suffix

More than 1000 fixed literals over 204 files. Once this goes in, enforcement will be enabled via PR 9452 (already approved by IDX).

Verifying This PR

To verify this PR, reproduce it by first checking out 30270d6186ec6d7fdc6080821bfdec3c4d6cd30c. Then, run the above command. Then,

cargo fmt
git fetch origin omnibus-separate-numeric-type-suffix-daniel-wong
git diff origin/omnibus-separate-numeric-type-suffix-daniel-wong

The git diff ... command should print nothing (meaning, that your run of cargo clippy --fix ... made the same edits as what's in the branch of this PR).

Prior Work

Earlier, I sent out a batch of PRs (one PR per team) that tried to fix everything, but it somehow missed a bunch of instances of 42u64. This SHOULD clean up the rest.

…all-targets --workspace -- --deny clippy::unseparated_literal_suffix. More than 1000 fixed literals over 204 files. Once this goes in, enforcement will be enabled via PR 9452.
@github-actions github-actions bot added the chore label Mar 20, 2026
@daniel-wong-dfinity-org daniel-wong-dfinity-org force-pushed the omnibus-separate-numeric-type-suffix-daniel-wong branch from daad1da to 40492e6 Compare March 20, 2026 13:32
@daniel-wong-dfinity-org daniel-wong-dfinity-org changed the title chore: 42u64 -> 42_u64. chore: 42u64 -> 42_u64 Mar 20, 2026
@daniel-wong-dfinity-org daniel-wong-dfinity-org marked this pull request as ready for review March 20, 2026 13:49
@daniel-wong-dfinity-org daniel-wong-dfinity-org requested review from a team as code owners March 20, 2026 13:49
github-actions[bot]

This comment was marked as resolved.

@daniel-wong-dfinity-org daniel-wong-dfinity-org dismissed github-actions[bot]’s stale review March 20, 2026 14:02

This is completely behavior preserving.

Copy link
Contributor

@pierugo-dfinity pierugo-dfinity left a comment

Choose a reason for hiding this comment

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

Do you know why your first PRs missed those instances?

@daniel-wong-dfinity-org
Copy link
Contributor Author

daniel-wong-dfinity-org commented Mar 20, 2026

Do you know why your first PRs missed those instances?

I think because AI tried to partition the code by team from .github/CODEOWNERS, which I guess is not so easy to do correctly, and as a result, the partition was not complete for whatever reason.

Another reason is that I did not fix 3.14f64 (to 3.14_f64), only integers, because I used a custom tool (with the help of AI), not cargo clippy --fix .... Whereas, unseparated_literal_suffix also requires floats suffixes to be separated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants