-
Notifications
You must be signed in to change notification settings - Fork 898
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dedup
imports_granularity = "Item"
(#4737)
* Fix for issue 4725 - dedup Item imports_granularity (2nd version) * Use unique() instead of unique_by()
- Loading branch information
1 parent
0e90855
commit 6b415bd
Showing
31 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
tests/source/imports/imports_granularity_default-with-dups.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
use crate::lexer; | ||
use crate::lexer::tokens::TokenData; | ||
use crate::lexer::{tokens::TokenData}; | ||
use crate::lexer::self; | ||
use crate::lexer::{self}; | ||
use crate::lexer::{self, tokens::TokenData}; |
13 changes: 13 additions & 0 deletions
13
tests/source/imports/imports_granularity_item-with-dups-StdExternalCrate-no-reorder.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// rustfmt-imports_granularity: Item | ||
// rustfmt-reorder_imports: false | ||
// rustfmt-group_imports: StdExternalCrate | ||
|
||
use crate::lexer; | ||
use crate::lexer; | ||
use crate::lexer::tokens::TokenData; | ||
use crate::lexer::{tokens::TokenData}; | ||
use crate::lexer::self; | ||
use crate::lexer; | ||
use crate::lexer; | ||
use crate::lexer::{self}; | ||
use crate::lexer::{self, tokens::TokenData}; |
11 changes: 11 additions & 0 deletions
11
tests/source/imports/imports_granularity_item-with-dups.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// rustfmt-imports_granularity: Item | ||
|
||
use crate::lexer; | ||
use crate::lexer; | ||
use crate::lexer::tokens::TokenData; | ||
use crate::lexer::{tokens::TokenData}; | ||
use crate::lexer::self; | ||
use crate::lexer; | ||
use crate::lexer; | ||
use crate::lexer::{self}; | ||
use crate::lexer::{self, tokens::TokenData}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
tests/target/imports/imports_granularity_default-with-dups.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
use crate::lexer; | ||
use crate::lexer; | ||
use crate::lexer::tokens::TokenData; | ||
use crate::lexer::tokens::TokenData; | ||
use crate::lexer::{self}; | ||
use crate::lexer::{self, tokens::TokenData}; |
7 changes: 7 additions & 0 deletions
7
tests/target/imports/imports_granularity_item-with-dups-StdExternalCrate-no-reorder.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// rustfmt-imports_granularity: Item | ||
// rustfmt-reorder_imports: false | ||
// rustfmt-group_imports: StdExternalCrate | ||
|
||
use crate::lexer; | ||
use crate::lexer::tokens::TokenData; | ||
use crate::lexer::{self}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// rustfmt-imports_granularity: Item | ||
|
||
use crate::lexer; | ||
use crate::lexer::tokens::TokenData; | ||
use crate::lexer::{self}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.