-
Notifications
You must be signed in to change notification settings - Fork 965
Closed
Labels
1x-backport:completedE-help-wantedCall for participation: help is requested to fix this issueCall for participation: help is requested to fix this issueI-poor-formattingIssue: poor formattingIssue: poor formattinggood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorsonly-with-optionRequires a non-default option value to reproduceRequires a non-default option value to reproduce
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 installwith .tool-versionsrust nightly-2021-02-17 - How do you run rustfmt:
rustfmt, in VSCode
stepancheg
Metadata
Metadata
Assignees
Labels
1x-backport:completedE-help-wantedCall for participation: help is requested to fix this issueCall for participation: help is requested to fix this issueI-poor-formattingIssue: poor formattingIssue: poor formattinggood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorsonly-with-optionRequires a non-default option value to reproduceRequires a non-default option value to reproduce