aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-07-21 11:28:58 +0100
committerAleksey Kladov <[email protected]>2019-07-21 11:28:58 +0100
commitd52ee59a712932bc381d8c690dc2f681598760fe (patch)
treef1fd1615203dd5552172cc35e0b6c5c9b76104c2 /crates/ra_ide_api/src/completion
parent62be91b82d6368a20a40893b199bc4f7a35a2223 (diff)
streamline API
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r--crates/ra_ide_api/src/completion/completion_context.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs
index 2f78d5409..968f5694b 100644
--- a/crates/ra_ide_api/src/completion/completion_context.rs
+++ b/crates/ra_ide_api/src/completion/completion_context.rs
@@ -1,6 +1,6 @@
1use hir::source_binder; 1use hir::source_binder;
2use ra_syntax::{ 2use ra_syntax::{
3 algo::{find_covering_element, find_node_at_offset, find_token_at_offset}, 3 algo::{find_covering_element, find_node_at_offset},
4 ast, AstNode, Parse, SourceFile, 4 ast, AstNode, Parse, SourceFile,
5 SyntaxKind::*, 5 SyntaxKind::*,
6 SyntaxNode, SyntaxToken, TextRange, TextUnit, 6 SyntaxNode, SyntaxToken, TextRange, TextUnit,
@@ -48,7 +48,7 @@ impl<'a> CompletionContext<'a> {
48 ) -> Option<CompletionContext<'a>> { 48 ) -> Option<CompletionContext<'a>> {
49 let module = source_binder::module_from_position(db, position); 49 let module = source_binder::module_from_position(db, position);
50 let token = 50 let token =
51 find_token_at_offset(original_parse.tree().syntax(), position.offset).left_biased()?; 51 original_parse.tree().syntax().token_at_offset(position.offset).left_biased()?;
52 let analyzer = 52 let analyzer =
53 hir::SourceAnalyzer::new(db, position.file_id, &token.parent(), Some(position.offset)); 53 hir::SourceAnalyzer::new(db, position.file_id, &token.parent(), Some(position.offset));
54 let mut ctx = CompletionContext { 54 let mut ctx = CompletionContext {