Skip to content
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

Add One option to group_imports #4966

Merged
merged 3 commits into from Oct 23, 2021
Merged

Conversation

Heliozoa
Copy link
Contributor

I gave a go at implementing my feature request at #4962, an option to group imports into one group. I mostly just copied the StdExternalCrate implementation.

@calebcartwright
Copy link
Member

Thank you for the PR! Won't have a chance to give this a thorough review for a while, but I do think the variant you've suggested is reasonable and definitely something we'll consider

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

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

I was initially surprised by how simple this and felt like something had to be missing 😄

The implementation LGTM, but I do want to rename the variant for consistency. I started applying inline suggestions to reflect the name change but decided against trying to do it for each one since the change is pretty clear.

Configurations.md Outdated Show resolved Hide resolved
Configurations.md Outdated Show resolved Hide resolved
src/config/options.rs Outdated Show resolved Hide resolved
@Heliozoa
Copy link
Contributor Author

Heliozoa commented Oct 19, 2021

I was initially surprised by how simple this and felt like something had to be missing smile

Same here! I was prepared to put a lot more time in, but it started working as soon as I had added the option and it was only after looking at the code some more that I understood why. 😅

I changed the name of the option to One as requested.

edit: Oops, I neglected to rename the test files. Everything should be good now.

@Heliozoa Heliozoa changed the title Add Together option to group_imports Add One option to group_imports Oct 19, 2021
@calebcartwright calebcartwright merged commit 599b2fd into rust-lang:master Oct 23, 2021
@Heliozoa Heliozoa deleted the together branch October 25, 2021 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants