aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion
diff options
context:
space:
mode:
authorMarco Groppo <[email protected]>2019-04-17 22:40:00 +0100
committerMarco Groppo <[email protected]>2019-04-19 23:20:26 +0100
commit8ebb20edce85b74eab0ed78ba5c4969ec733ad12 (patch)
treeeb23fc45cc395de68ad60ced6bd65d80c4945245 /crates/ra_ide_api/src/completion
parente85ee60c42db57368e24ad9ac24840c2494d383c (diff)
New krate() method in Resolver.
Renamed Impl to ImplBlock.
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r--crates/ra_ide_api/src/completion/complete_path.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs
index c49147b9e..c41752ae7 100644
--- a/crates/ra_ide_api/src/completion/complete_path.rs
+++ b/crates/ra_ide_api/src/completion/complete_path.rs
@@ -39,7 +39,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
39 hir::ModuleDef::Struct(s) => { 39 hir::ModuleDef::Struct(s) => {
40 let ty = s.ty(ctx.db); 40 let ty = s.ty(ctx.db);
41 let krate = ctx.module.and_then(|m| m.krate(ctx.db)); 41 let krate = ctx.module.and_then(|m| m.krate(ctx.db));
42 krate.map_or((), |krate| { 42 if let Some(krate) = krate {
43 ty.iterate_impl_items(ctx.db, krate, |item| { 43 ty.iterate_impl_items(ctx.db, krate, |item| {
44 match item { 44 match item {
45 hir::ImplItem::Method(func) => { 45 hir::ImplItem::Method(func) => {
@@ -53,7 +53,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
53 } 53 }
54 None::<()> 54 None::<()>
55 }); 55 });
56 }); 56 }
57 } 57 }
58 _ => return, 58 _ => return,
59 }; 59 };