From b871062e329301683083a1a2ff5eb476e6c397c7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 15 Jan 2019 20:43:37 +0300 Subject: remove Cancelable from Ty --- crates/ra_ide_api/src/completion/complete_dot.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 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 cb86ba9a3..30a0a3924 100644 --- a/crates/ra_ide_api/src/completion/complete_dot.rs +++ b/crates/ra_ide_api/src/completion/complete_dot.rs @@ -17,13 +17,13 @@ pub(super) fn complete_dot(acc: &mut Completions, ctx: &CompletionContext) -> Ca }; let receiver_ty = infer_result[expr].clone(); if !ctx.is_call { - complete_fields(acc, ctx, receiver_ty.clone())?; + complete_fields(acc, ctx, receiver_ty.clone()); } complete_methods(acc, ctx, receiver_ty)?; Ok(()) } -fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) -> Cancelable<()> { +fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) { for receiver in receiver.autoderef(ctx.db) { match receiver { Ty::Adt { def_id, .. } => { @@ -35,7 +35,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) field.name().to_string(), ) .kind(CompletionItemKind::Field) - .set_detail(field.ty(ctx.db)?.map(|ty| ty.to_string())) + .set_detail(field.ty(ctx.db).map(|ty| ty.to_string())) .add_to(acc); } } @@ -53,7 +53,6 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) _ => {} }; } - Ok(()) } fn complete_methods( -- cgit v1.2.3