aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api')
-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 };