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

Simplify multiple use declarations in same module #2452

Closed
zombiezen opened this issue Feb 16, 2018 · 0 comments · Fixed by #2603
Closed

Simplify multiple use declarations in same module #2452

zombiezen opened this issue Feb 16, 2018 · 0 comments · Fixed by #2603

Comments

@zombiezen
Copy link

(I'm a Rust noob, so this might not be a great idea.)

I found myself following this pattern in my learning project:

use std::io;
use std::io::BufRead;
use std::io::Read;

when it could have been written much more concisely as:

use std::io::{self, BufRead, Read};

It seems like if you have a bunch of use declarations in sequence, rustfmt could use some heuristics and condense them. I searched through the issue tracker and couldn't find anything like this.

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 a pull request may close this issue.

1 participant