diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-12 16:04:52 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-12 16:04:52 +0100 |
commit | a573e088ac64eeeb19e4fc74be2ff019be510477 (patch) | |
tree | 392c214055eab6a713814d46435bc0d91cf84e6c /crates/ra_assists | |
parent | 6dba0e1c4de3b225556f7fce70518c8ebff170a6 (diff) | |
parent | 6dafc13f5f776980cd2560fb79d3d4790811c96d (diff) |
Merge #5726
5726: Rename ra_text_edit -> text_edit
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists')
-rw-r--r-- | crates/ra_assists/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_assists/src/assist_context.rs | 4 | ||||
-rw-r--r-- | crates/ra_assists/src/utils/insert_use.rs | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_assists/Cargo.toml b/crates/ra_assists/Cargo.toml index 6f5ace941..e4a5ee6c1 100644 --- a/crates/ra_assists/Cargo.toml +++ b/crates/ra_assists/Cargo.toml | |||
@@ -16,7 +16,7 @@ either = "1.5.3" | |||
16 | stdx = { path = "../stdx" } | 16 | stdx = { path = "../stdx" } |
17 | 17 | ||
18 | ra_syntax = { path = "../ra_syntax" } | 18 | ra_syntax = { path = "../ra_syntax" } |
19 | ra_text_edit = { path = "../ra_text_edit" } | 19 | text_edit = { path = "../text_edit" } |
20 | ra_fmt = { path = "../ra_fmt" } | 20 | ra_fmt = { path = "../ra_fmt" } |
21 | profile = { path = "../profile" } | 21 | profile = { path = "../profile" } |
22 | ra_db = { path = "../ra_db" } | 22 | ra_db = { path = "../ra_db" } |
diff --git a/crates/ra_assists/src/assist_context.rs b/crates/ra_assists/src/assist_context.rs index afd3fd4b9..fcaa1aedc 100644 --- a/crates/ra_assists/src/assist_context.rs +++ b/crates/ra_assists/src/assist_context.rs | |||
@@ -15,7 +15,7 @@ use ra_syntax::{ | |||
15 | AstNode, SourceFile, SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken, TextRange, TextSize, | 15 | AstNode, SourceFile, SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken, TextRange, TextSize, |
16 | TokenAtOffset, | 16 | TokenAtOffset, |
17 | }; | 17 | }; |
18 | use ra_text_edit::TextEditBuilder; | 18 | use text_edit::{TextEdit, TextEditBuilder}; |
19 | 19 | ||
20 | use crate::{ | 20 | use crate::{ |
21 | assist_config::{AssistConfig, SnippetCap}, | 21 | assist_config::{AssistConfig, SnippetCap}, |
@@ -214,7 +214,7 @@ pub(crate) struct AssistBuilder { | |||
214 | impl AssistBuilder { | 214 | impl AssistBuilder { |
215 | pub(crate) fn new(file_id: FileId) -> AssistBuilder { | 215 | pub(crate) fn new(file_id: FileId) -> AssistBuilder { |
216 | AssistBuilder { | 216 | AssistBuilder { |
217 | edit: TextEditBuilder::default(), | 217 | edit: TextEdit::builder(), |
218 | file_id, | 218 | file_id, |
219 | is_snippet: false, | 219 | is_snippet: false, |
220 | change: SourceChange::default(), | 220 | change: SourceChange::default(), |
diff --git a/crates/ra_assists/src/utils/insert_use.rs b/crates/ra_assists/src/utils/insert_use.rs index 32780fceb..13dbe1919 100644 --- a/crates/ra_assists/src/utils/insert_use.rs +++ b/crates/ra_assists/src/utils/insert_use.rs | |||
@@ -2,6 +2,7 @@ | |||
2 | // FIXME: rewrite according to the plan, outlined in | 2 | // FIXME: rewrite according to the plan, outlined in |
3 | // https://github.com/rust-analyzer/rust-analyzer/issues/3301#issuecomment-592931553 | 3 | // https://github.com/rust-analyzer/rust-analyzer/issues/3301#issuecomment-592931553 |
4 | 4 | ||
5 | use either::Either; | ||
5 | use hir::{self, ModPath}; | 6 | use hir::{self, ModPath}; |
6 | use ra_syntax::{ | 7 | use ra_syntax::{ |
7 | ast::{self, NameOwner, VisibilityOwner}, | 8 | ast::{self, NameOwner, VisibilityOwner}, |
@@ -9,10 +10,9 @@ use ra_syntax::{ | |||
9 | SyntaxKind::{PATH, PATH_SEGMENT}, | 10 | SyntaxKind::{PATH, PATH_SEGMENT}, |
10 | SyntaxNode, T, | 11 | SyntaxNode, T, |
11 | }; | 12 | }; |
12 | use ra_text_edit::TextEditBuilder; | 13 | use text_edit::TextEditBuilder; |
13 | 14 | ||
14 | use crate::assist_context::AssistContext; | 15 | use crate::assist_context::AssistContext; |
15 | use either::Either; | ||
16 | 16 | ||
17 | /// Determines the containing syntax node in which to insert a `use` statement affecting `position`. | 17 | /// Determines the containing syntax node in which to insert a `use` statement affecting `position`. |
18 | pub(crate) fn find_insert_use_container( | 18 | pub(crate) fn find_insert_use_container( |