From 490112dea10d476e9b5829499bc6670f03f7d138 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 15 Jan 2019 19:15:01 +0300 Subject: remove Cancelable from nameres --- crates/ra_ide_api/src/completion/complete_path.rs | 4 ++-- crates/ra_ide_api/src/completion/complete_scope.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide_api/src/completion') diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs index 207a509b3..42468681a 100644 --- a/crates/ra_ide_api/src/completion/complete_path.rs +++ b/crates/ra_ide_api/src/completion/complete_path.rs @@ -8,13 +8,13 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) -> C (Some(path), Some(module)) => (path.clone(), module), _ => return Ok(()), }; - let def_id = match module.resolve_path(ctx.db, &path)?.take_types() { + let def_id = match module.resolve_path(ctx.db, &path).take_types() { Some(it) => it, None => return Ok(()), }; match def_id.resolve(ctx.db) { hir::Def::Module(module) => { - let module_scope = module.scope(ctx.db)?; + let module_scope = module.scope(ctx.db); for (name, res) in module_scope.entries() { CompletionItem::new(CompletionKind::Reference, name.to_string()) .from_resolution(ctx, res) diff --git a/crates/ra_ide_api/src/completion/complete_scope.rs b/crates/ra_ide_api/src/completion/complete_scope.rs index fdb64895e..660c7d16e 100644 --- a/crates/ra_ide_api/src/completion/complete_scope.rs +++ b/crates/ra_ide_api/src/completion/complete_scope.rs @@ -19,7 +19,7 @@ pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) -> complete_fn(acc, &scopes, ctx.offset); } - let module_scope = module.scope(ctx.db)?; + let module_scope = module.scope(ctx.db); let (file_id, _) = module.definition_source(ctx.db); module_scope .entries() -- cgit v1.2.3