diff options
author | Florian Diebold <[email protected]> | 2019-01-27 16:23:49 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-02-01 21:54:21 +0000 |
commit | d3df80dfe41e4e3ab7644ae576119a264ba0e7f1 (patch) | |
tree | 9e19af8285cd2e95aa0ec79e589c3d08fb9047bf /crates/ra_ide_api/src/completion | |
parent | afce8e442639fa9ed954b3659a2d1eccb7d80113 (diff) |
Cleanup
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_path.rs | 6 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/completion_context.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs index 9e61c0212..5b89c64ad 100644 --- a/crates/ra_ide_api/src/completion/complete_path.rs +++ b/crates/ra_ide_api/src/completion/complete_path.rs | |||
@@ -1,11 +1,11 @@ | |||
1 | use join_to_string::join; | 1 | use join_to_string::join; |
2 | 2 | ||
3 | use hir::{Docs, Resolution}; | ||
4 | |||
3 | use crate::{ | 5 | use crate::{ |
4 | completion::{CompletionItem, CompletionItemKind, Completions, CompletionKind, CompletionContext}, | 6 | completion::{CompletionItem, CompletionItemKind, Completions, CompletionKind, CompletionContext}, |
5 | }; | 7 | }; |
6 | 8 | ||
7 | use hir::Docs; | ||
8 | |||
9 | pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) { | 9 | pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) { |
10 | let path = match &ctx.path_prefix { | 10 | let path = match &ctx.path_prefix { |
11 | Some(path) => path.clone(), | 11 | Some(path) => path.clone(), |
@@ -15,7 +15,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) { | |||
15 | Some(Resolution::Def { def }) => def, | 15 | Some(Resolution::Def { def }) => def, |
16 | _ => return, | 16 | _ => return, |
17 | }; | 17 | }; |
18 | match def_id { | 18 | match def { |
19 | hir::ModuleDef::Module(module) => { | 19 | hir::ModuleDef::Module(module) => { |
20 | let module_scope = module.scope(ctx.db); | 20 | let module_scope = module.scope(ctx.db); |
21 | for (name, res) in module_scope.entries() { | 21 | for (name, res) in module_scope.entries() { |
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs index aea32fce3..5d1851da6 100644 --- a/crates/ra_ide_api/src/completion/completion_context.rs +++ b/crates/ra_ide_api/src/completion/completion_context.rs | |||
@@ -16,7 +16,7 @@ pub(crate) struct CompletionContext<'a> { | |||
16 | pub(super) db: &'a db::RootDatabase, | 16 | pub(super) db: &'a db::RootDatabase, |
17 | pub(super) offset: TextUnit, | 17 | pub(super) offset: TextUnit, |
18 | pub(super) leaf: &'a SyntaxNode, | 18 | pub(super) leaf: &'a SyntaxNode, |
19 | pub(super) resolver: Resolver<'static>, | 19 | pub(super) resolver: Resolver, |
20 | pub(super) module: Option<hir::Module>, | 20 | pub(super) module: Option<hir::Module>, |
21 | pub(super) function: Option<hir::Function>, | 21 | pub(super) function: Option<hir::Function>, |
22 | pub(super) function_syntax: Option<&'a ast::FnDef>, | 22 | pub(super) function_syntax: Option<&'a ast::FnDef>, |