mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Use UnordSet instead of FxHashSet for names_imported_by_glob_use query.
This commit is contained in:
parent
0966f59c78
commit
09566cc3d8
1 changed files with 3 additions and 7 deletions
|
@ -155,14 +155,10 @@ impl LateLintPass<'_> for WildcardImports {
|
|||
)
|
||||
};
|
||||
|
||||
let imports_string = if used_imports.len() == 1 {
|
||||
used_imports.iter().next().unwrap().to_string()
|
||||
let mut imports = used_imports.items().map(ToString::to_string).into_sorted_stable_ord(false);
|
||||
let imports_string = if imports.len() == 1 {
|
||||
imports.pop().unwrap()
|
||||
} else {
|
||||
let mut imports = used_imports
|
||||
.iter()
|
||||
.map(ToString::to_string)
|
||||
.collect::<Vec<_>>();
|
||||
imports.sort();
|
||||
if braced_glob {
|
||||
imports.join(", ")
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue