From 9446be29992fe14ec529874622311c3ae7a49b0e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 15 Jan 2019 18:43:25 +0300 Subject: remove Cancelable from adt API --- crates/ra_ide_api/src/completion/complete_dot.rs | 2 +- crates/ra_ide_api/src/completion/complete_path.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide_api/src/completion') diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs index 37985b398..bf6d91a09 100644 --- a/crates/ra_ide_api/src/completion/complete_dot.rs +++ b/crates/ra_ide_api/src/completion/complete_dot.rs @@ -29,7 +29,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) Ty::Adt { def_id, .. } => { match def_id.resolve(ctx.db)? { Def::Struct(s) => { - for field in s.fields(ctx.db)? { + for field in s.fields(ctx.db) { CompletionItem::new( CompletionKind::Reference, field.name().to_string(), diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs index a25ad3f13..6388197be 100644 --- a/crates/ra_ide_api/src/completion/complete_path.rs +++ b/crates/ra_ide_api/src/completion/complete_path.rs @@ -22,7 +22,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) -> C } } hir::Def::Enum(e) => { - e.variants(ctx.db)? + e.variants(ctx.db) .into_iter() .for_each(|(variant_name, _variant)| { CompletionItem::new(CompletionKind::Reference, variant_name.to_string()) -- cgit v1.2.3