Closed
Description
Describe the bug
Duplicate imports are not removed with imports_granularity = "Item"
turned on.
To Reproduce
test.rs
use std::env;
use std::env;
fn main() {
println!("{:?}", env::var("TEST"));
}
.rustfmt.toml
unstable_features = true
edition = "2018"
imports_granularity = "Item"
Run rustfmt test.rs
Expected behavior
Duplicate use std::env;
should be removed. It is not.
Meta
- rustfmt version:
rustfmt 1.4.36-nightly (7de6968 2021-02-07)
- From where did you install rustfmt?:
asdf install
with .tool-versionsrust nightly-2021-02-17
- How do you run rustfmt:
rustfmt
, in VSCode