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

Format 'use declaration' in a more readable way #4513

Closed
kaiwk opened this issue Nov 5, 2020 · 1 comment
Closed

Format 'use declaration' in a more readable way #4513

kaiwk opened this issue Nov 5, 2020 · 1 comment

Comments

@kaiwk
Copy link

kaiwk commented Nov 5, 2020

📋 Description

See: https://users.rust-lang.org/t/use-declaration-convention/45251

I'm not sure if rustfmt has option to group the use statements, i think that would make it more readable. For now, if one forget add a blank line between use std::... and use crate::..., rustfmt will sort them by ASCII I suppose.

Besides, rust-analyzer auto import will add use statements in std > third-party > current crate order, with blank lines among them.

@kaiwk
Copy link
Author

kaiwk commented Nov 5, 2020

Looks like there's a PR(#4445) for it.

@kaiwk kaiwk closed this as completed Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant