diff options
author | Aleksey Kladov <[email protected]> | 2020-02-06 11:52:32 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-02-06 13:03:45 +0000 |
commit | 88267c86c0c49de395973574d2516ab904091cfb (patch) | |
tree | 3c137f0c6a34c0ae787c7d8d59ccf2398fab1bfa /crates/ra_ide/src/completion | |
parent | 939f05f3e33e9f00d5205d60af3a862ae4d58bd6 (diff) |
cleanup imports
Diffstat (limited to 'crates/ra_ide/src/completion')
-rw-r--r-- | crates/ra_ide/src/completion/completion_context.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs index deaacda6c..5a0407fd7 100644 --- a/crates/ra_ide/src/completion/completion_context.rs +++ b/crates/ra_ide/src/completion/completion_context.rs | |||
@@ -1,5 +1,6 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use ra_ide_db::RootDatabase; | ||
3 | use ra_syntax::{ | 4 | use ra_syntax::{ |
4 | algo::{find_covering_element, find_node_at_offset}, | 5 | algo::{find_covering_element, find_node_at_offset}, |
5 | ast, AstNode, Parse, SourceFile, | 6 | ast, AstNode, Parse, SourceFile, |
@@ -8,13 +9,13 @@ use ra_syntax::{ | |||
8 | }; | 9 | }; |
9 | use ra_text_edit::AtomTextEdit; | 10 | use ra_text_edit::AtomTextEdit; |
10 | 11 | ||
11 | use crate::{db, FilePosition}; | 12 | use crate::FilePosition; |
12 | 13 | ||
13 | /// `CompletionContext` is created early during completion to figure out, where | 14 | /// `CompletionContext` is created early during completion to figure out, where |
14 | /// exactly is the cursor, syntax-wise. | 15 | /// exactly is the cursor, syntax-wise. |
15 | #[derive(Debug)] | 16 | #[derive(Debug)] |
16 | pub(crate) struct CompletionContext<'a> { | 17 | pub(crate) struct CompletionContext<'a> { |
17 | pub(super) db: &'a db::RootDatabase, | 18 | pub(super) db: &'a RootDatabase, |
18 | pub(super) analyzer: hir::SourceAnalyzer, | 19 | pub(super) analyzer: hir::SourceAnalyzer, |
19 | pub(super) offset: TextUnit, | 20 | pub(super) offset: TextUnit, |
20 | pub(super) token: SyntaxToken, | 21 | pub(super) token: SyntaxToken, |
@@ -48,7 +49,7 @@ pub(crate) struct CompletionContext<'a> { | |||
48 | 49 | ||
49 | impl<'a> CompletionContext<'a> { | 50 | impl<'a> CompletionContext<'a> { |
50 | pub(super) fn new( | 51 | pub(super) fn new( |
51 | db: &'a db::RootDatabase, | 52 | db: &'a RootDatabase, |
52 | original_parse: &'a Parse<ast::SourceFile>, | 53 | original_parse: &'a Parse<ast::SourceFile>, |
53 | position: FilePosition, | 54 | position: FilePosition, |
54 | ) -> Option<CompletionContext<'a>> { | 55 | ) -> Option<CompletionContext<'a>> { |