diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-25 17:08:56 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-25 17:08:56 +0100 |
commit | 13fd8846b4bdf214cce467b19fefe44ca518a849 (patch) | |
tree | d788985ca64f5351b9c60cac8fbfa6919d095b4a | |
parent | 33c4afeae085b182a89cf8acea4d3eb193318c92 (diff) | |
parent | 4f6ca0e081b825031921d10fba3554c119ff29a0 (diff) |
Merge #5881
5881: Minor
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
-rw-r--r-- | crates/assists/src/handlers/extract_struct_from_enum_variant.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/assists/src/handlers/extract_struct_from_enum_variant.rs index c1124b9e2..8ac20210a 100644 --- a/crates/assists/src/handlers/extract_struct_from_enum_variant.rs +++ b/crates/assists/src/handlers/extract_struct_from_enum_variant.rs | |||
@@ -1,6 +1,7 @@ | |||
1 | use base_db::FileId; | 1 | use base_db::FileId; |
2 | use hir::{EnumVariant, Module, ModuleDef, Name}; | 2 | use hir::{EnumVariant, Module, ModuleDef, Name}; |
3 | use ide_db::{defs::Definition, search::Reference, RootDatabase}; | 3 | use ide_db::{defs::Definition, search::Reference, RootDatabase}; |
4 | use itertools::Itertools; | ||
4 | use rustc_hash::FxHashSet; | 5 | use rustc_hash::FxHashSet; |
5 | use syntax::{ | 6 | use syntax::{ |
6 | algo::find_node_at_offset, | 7 | algo::find_node_at_offset, |
@@ -203,13 +204,11 @@ fn list_with_visibility(list: &str) -> String { | |||
203 | mod_part.insert_str(index, "pub "); | 204 | mod_part.insert_str(index, "pub "); |
204 | mod_part | 205 | mod_part |
205 | }) | 206 | }) |
206 | .collect::<Vec<String>>() | ||
207 | .join(", ") | 207 | .join(", ") |
208 | } | 208 | } |
209 | 209 | ||
210 | #[cfg(test)] | 210 | #[cfg(test)] |
211 | mod tests { | 211 | mod tests { |
212 | |||
213 | use crate::{ | 212 | use crate::{ |
214 | tests::{check_assist, check_assist_not_applicable}, | 213 | tests::{check_assist, check_assist_not_applicable}, |
215 | utils::FamousDefs, | 214 | utils::FamousDefs, |