Merged
Conversation
This commits adds a rustfmt configuration to create three import groups: 1. std, core 2. external 3. local crates and group all the imports based on these three groups. Changed `cargo fmt --all` to `cargo +nightly fmt --all` as this feature isn't stable Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Member
Author
|
Question: do you all prefer imports granularity to be "crate" or "module", or something else? See https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=#imports_granularity |
This commits adds a imports_granularity configuration to rustfmt.toml to merge imports from the same module into a single use statement. Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Collaborator
Module is fine for me. Either is fine actually. To me consistency is more important than what particular option we choose. |
Member
Author
|
I am going to merge this in. @jsturtevant any concerns on merging? For rebasing, I think the easier way is to copy the |
Contributor
|
we will see how rebasing #238 will go, might make me 😢
💯 |
Member
Author
|
Merging it |
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.
This commits adds a rustfmt configuration to create three import groups:
and group all the imports based on these three groups.
Changed
cargo fmt --alltocargo +nightly fmt --allas this feature isn't stable