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

Have rustfmt group use statements #232

Open
brettcannon opened this issue Oct 9, 2022 · 2 comments
Open

Have rustfmt group use statements #232

brettcannon opened this issue Oct 9, 2022 · 2 comments
Labels
good first issue Good for newcomers impact-maintenance Maintenance of the code/project

Comments

@brettcannon
Copy link
Owner

many people prefer to format their use lines in three blocks: imports from the standard library, imports from external crates, and then imports from modules within the same project. rustfmt supports this via the option group_imports = StdExternalCrate

@brettcannon brettcannon added good first issue Good for newcomers impact-maintenance Maintenance of the code/project labels Oct 9, 2022
@sanders41
Copy link

To use this you need to switch to nightly as it is not stable yet (reference here). Using it on stable throws an error:

Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.

@brettcannon
Copy link
Owner Author

Darn. I'll leave this open for when it reaches stable. Thanks for leaving a comment about the availability!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers impact-maintenance Maintenance of the code/project
Projects
None yet
Development

No branches or pull requests

2 participants