rust-lang/rustfmt

Simplify `use std::io::{self};`

Closed this issue · 1 comments

I sometimes end up with this kind of dummy import lines:

use std::io::{self};

Maybe rustfmt could simplify it into:

use std::io;

?

@iago-lito This has come up before. My understanding is that there are semantic differences between use std::io::{self}; and use std::io;, so rustfmt can't safely make that change without potentially breaking your code. See #3568 and other linked issues.