diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-05 10:57:39 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-05 10:57:39 +0000 |
commit | 9b5b13dfcfe32bccbf3593eee26bf88a5fd60413 (patch) | |
tree | 6e9822bea3fbda059fa02661f6e6137770885520 /crates/ra_editor/src/assists.rs | |
parent | 481713a0e17e1557288e88a6b1a173b111792998 (diff) | |
parent | ea3504057e73f541af64451a1b5d2c691d5c01bc (diff) |
Merge #430
430: split import assist r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_editor/src/assists.rs')
-rw-r--r-- | crates/ra_editor/src/assists.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_editor/src/assists.rs b/crates/ra_editor/src/assists.rs index cc40ee4c8..57b78342a 100644 --- a/crates/ra_editor/src/assists.rs +++ b/crates/ra_editor/src/assists.rs | |||
@@ -8,6 +8,7 @@ mod add_derive; | |||
8 | mod add_impl; | 8 | mod add_impl; |
9 | mod introduce_variable; | 9 | mod introduce_variable; |
10 | mod change_visibility; | 10 | mod change_visibility; |
11 | mod split_import; | ||
11 | 12 | ||
12 | use ra_text_edit::{TextEdit, TextEditBuilder}; | 13 | use ra_text_edit::{TextEdit, TextEditBuilder}; |
13 | use ra_syntax::{ | 14 | use ra_syntax::{ |
@@ -23,6 +24,7 @@ pub use self::{ | |||
23 | add_impl::add_impl, | 24 | add_impl::add_impl, |
24 | introduce_variable::introduce_variable, | 25 | introduce_variable::introduce_variable, |
25 | change_visibility::change_visibility, | 26 | change_visibility::change_visibility, |
27 | split_import::split_import, | ||
26 | }; | 28 | }; |
27 | 29 | ||
28 | /// Return all the assists applicable at the given position. | 30 | /// Return all the assists applicable at the given position. |
@@ -34,6 +36,7 @@ pub fn assists(file: &SourceFileNode, range: TextRange) -> Vec<LocalEdit> { | |||
34 | add_impl, | 36 | add_impl, |
35 | introduce_variable, | 37 | introduce_variable, |
36 | change_visibility, | 38 | change_visibility, |
39 | split_import, | ||
37 | ] | 40 | ] |
38 | .iter() | 41 | .iter() |
39 | .filter_map(|&assist| ctx.clone().apply(assist)) | 42 | .filter_map(|&assist| ctx.clone().apply(assist)) |