From 040a622c5277511b4835fa35b72c314bf080b8cc Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 15 Jan 2019 19:01:59 +0300 Subject: remove Cancelable from funciton body --- crates/ra_ide_api/src/completion/complete_dot.rs | 2 +- crates/ra_ide_api/src/goto_definition.rs | 2 +- crates/ra_ide_api/src/hover.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide_api') diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs index 886dc54d4..cb86ba9a3 100644 --- a/crates/ra_ide_api/src/completion/complete_dot.rs +++ b/crates/ra_ide_api/src/completion/complete_dot.rs @@ -10,7 +10,7 @@ pub(super) fn complete_dot(acc: &mut Completions, ctx: &CompletionContext) -> Ca _ => return Ok(()), }; let infer_result = function.infer(ctx.db)?; - let syntax_mapping = function.body_syntax_mapping(ctx.db)?; + let syntax_mapping = function.body_syntax_mapping(ctx.db); let expr = match syntax_mapping.node_expr(receiver) { Some(expr) => expr, None => return Ok(()), diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs index 7229293a4..46fd6883f 100644 --- a/crates/ra_ide_api/src/goto_definition.rs +++ b/crates/ra_ide_api/src/goto_definition.rs @@ -64,7 +64,7 @@ pub(crate) fn reference_definition( .and_then(ast::MethodCallExpr::cast) { let infer_result = function.infer(db)?; - let syntax_mapping = function.body_syntax_mapping(db)?; + let syntax_mapping = function.body_syntax_mapping(db); let expr = ast::Expr::cast(method_call.syntax()).unwrap(); if let Some(def_id) = syntax_mapping .node_expr(expr) diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs index 26f3ced70..0e9c48421 100644 --- a/crates/ra_ide_api/src/hover.rs +++ b/crates/ra_ide_api/src/hover.rs @@ -74,7 +74,7 @@ pub(crate) fn type_of(db: &RootDatabase, frange: FileRange) -> Cancelable