Skip to content

Reorganize imports not working #1093

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

Closed
Limeth opened this issue Jul 13, 2016 · 4 comments
Closed

Reorganize imports not working #1093

Limeth opened this issue Jul 13, 2016 · 4 comments

Comments

@Limeth
Copy link

Limeth commented Jul 13, 2016

Putting reorder_imports = true into rustfmt.toml doesn't make rustfmt reorder imports.
You can try this by cloning euclider, running cargo fmt -- --write-mode overwrite --verbose and looking at lines with use in file src/universe/d3/entity/surface.rs.

@studoot
Copy link
Contributor

studoot commented Jul 13, 2016

I think it's intended to sort the used items in one line

use mod::{c, b, a};

becomes

use mod::{a, b, c};

Thats how I read the source, which I was looking at because I'd thought the same as you (that it should sort the use lines in a source file) earlier today.

@Limeth
Copy link
Author

Limeth commented Jul 13, 2016

That explains it. I would really like to have an option to order the lines, too.

@studoot
Copy link
Contributor

studoot commented Jul 14, 2016

Yes, me too - well, this is an issue. If you re-title to "Add reordering of use statements" or something like that, then you can make it a feature request rather than a bug report?

@nrc
Copy link
Member

nrc commented Jul 15, 2016

That is #298. I think everything here either works or is covered by #298, so I'll close this issue. Please feel free to re-open if there something not covered.

@nrc nrc closed this as completed Jul 15, 2016
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

No branches or pull requests

3 participants