Bump rustfmt style_edition to 2024
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
The switch to edition 2024 Rust explicitly kept the rustfmt style at `2021`:
- https://github.com/bevyengine/bevy/issues/17960#issuecomment-2676153566
It would be nice to at some point bump this benefit from some of the ways formatting has gotten nicer.
Heres some of the ones i noticed testing this in bevy:
- long lines more readily broken onto the next line
- impl blocks with logs of generics and traits broken up more sensibly:
- long functions broken up more sensibly
- `tuple.0 .0` -> `tuple.0.0`
The primary issue why this was initially ignored still persists tho: The order of items in a single `use` changed to be alphabetical with uppercase first, which caused lots of changes over a large number of files. `git diff --stat` says `904 files changed, 3901 insertions(+), 3299 deletions(-)`
Contributor guide
Research direction
Start by locating the repository's rustfmt configuration and reviewing how Rust edition 2024 currently keeps rustfmt at style_edition 2021. Compare the formatting changes described in the issue, especially single-use ordering, and use the reported git diff --stat as a baseline. Done means the style edition is bumped and the resulting repository-wide changes are reviewed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100