-
Notifications
You must be signed in to change notification settings - Fork 20
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
Import grouping #701
Import grouping #701
Conversation
|
# rustfmt nightly configuration options: | ||
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md | ||
# | ||
|
||
group_imports = "StdExternalCrate" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you!
What do you think about setting imports_granularity = "Crate"
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a great fan of Module
and so I didn't want to fight this battle in this PR 🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see 😅 alright. Let's talk about it later.
# rustfmt nightly configuration options: | ||
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md | ||
# | ||
|
||
group_imports = "StdExternalCrate" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see 😅 alright. Let's talk about it later.
Part of #155
This is fairly standard practice - we group the imports in the
std
> external libraries > current crate categories, separated by newlines.Some links:
use
) rust-lang/style-team#24