diff options
author | Aleksey Kladov <[email protected]> | 2019-01-15 16:01:59 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-15 16:01:59 +0000 |
commit | 040a622c5277511b4835fa35b72c314bf080b8cc (patch) | |
tree | 30117173485c6e660b9db7d0fc34c34f724e2b31 /crates/ra_ide_api | |
parent | 7c977a7dcd2bac3b6148f2428bcb586c6354d775 (diff) |
remove Cancelable from funciton body
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_dot.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/goto_definition.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/hover.rs | 2 |
3 files changed, 3 insertions, 3 deletions
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 | |||
10 | _ => return Ok(()), | 10 | _ => return Ok(()), |
11 | }; | 11 | }; |
12 | let infer_result = function.infer(ctx.db)?; | 12 | let infer_result = function.infer(ctx.db)?; |
13 | let syntax_mapping = function.body_syntax_mapping(ctx.db)?; | 13 | let syntax_mapping = function.body_syntax_mapping(ctx.db); |
14 | let expr = match syntax_mapping.node_expr(receiver) { | 14 | let expr = match syntax_mapping.node_expr(receiver) { |
15 | Some(expr) => expr, | 15 | Some(expr) => expr, |
16 | None => return Ok(()), | 16 | 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( | |||
64 | .and_then(ast::MethodCallExpr::cast) | 64 | .and_then(ast::MethodCallExpr::cast) |
65 | { | 65 | { |
66 | let infer_result = function.infer(db)?; | 66 | let infer_result = function.infer(db)?; |
67 | let syntax_mapping = function.body_syntax_mapping(db)?; | 67 | let syntax_mapping = function.body_syntax_mapping(db); |
68 | let expr = ast::Expr::cast(method_call.syntax()).unwrap(); | 68 | let expr = ast::Expr::cast(method_call.syntax()).unwrap(); |
69 | if let Some(def_id) = syntax_mapping | 69 | if let Some(def_id) = syntax_mapping |
70 | .node_expr(expr) | 70 | .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<Option | |||
74 | parent_fn | 74 | parent_fn |
75 | )); | 75 | )); |
76 | let infer = function.infer(db)?; | 76 | let infer = function.infer(db)?; |
77 | let syntax_mapping = function.body_syntax_mapping(db)?; | 77 | let syntax_mapping = function.body_syntax_mapping(db); |
78 | if let Some(expr) = ast::Expr::cast(node).and_then(|e| syntax_mapping.node_expr(e)) { | 78 | if let Some(expr) = ast::Expr::cast(node).and_then(|e| syntax_mapping.node_expr(e)) { |
79 | Ok(Some(infer[expr].to_string())) | 79 | Ok(Some(infer[expr].to_string())) |
80 | } else if let Some(pat) = ast::Pat::cast(node).and_then(|p| syntax_mapping.node_pat(p)) { | 80 | } else if let Some(pat) = ast::Pat::cast(node).and_then(|p| syntax_mapping.node_pat(p)) { |