Merged
Conversation
|
👋 Thanks for assigning @joostjager as a reviewer! |
Nightly `rustfmt` allows to auto-group imports on the module level. While we're not quite convinced to switch to the nightly channel for this yet (mostly because not all contributors would have the right nightly version installed on their machines), we here make use of `cargo +nightly fmt` with some addtional import grouping options as a one-off. This cleans up our imports for the whole crate and gets us to a consistent state everywhere.
fbe2f46 to
2ae3466
Compare
joostjager
approved these changes
Sep 29, 2025
| # UNSTABLE: format_strings = true | ||
| # UNSTABLE: group_imports = "StdExternalCrate" | ||
| # UNSTABLE: reorder_imports = true | ||
| # UNSTABLE: imports_granularity = "Module" |
Contributor
There was a problem hiding this comment.
We put this in so that users who want to can still run the nightly version and get the imports fixed?
Collaborator
Author
There was a problem hiding this comment.
Yes, and this is the list of rustfmt features we want to enable once we can. Put them here also so we don't forget.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nightly
rustfmtallows to auto-group imports on the module level. While we're not quite convinced to switch to the nightly channel for this yet (mostly because not all contributors would have the right nightly version installed on their machines), we here make use ofcargo +nightly fmtwith some addtional import grouping options as a one-off. This cleans up our imports for the whole crate and gets us to a consistent state everywhere.To reproduce, run
cargo +nightly fmtwith the following lines inrustfmt.tomlenabled: