diff options
author | Aleksey Kladov <[email protected]> | 2019-01-15 17:43:37 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-15 17:43:37 +0000 |
commit | b871062e329301683083a1a2ff5eb476e6c397c7 (patch) | |
tree | 79ce5dbafb59a042862ee91fdc8b89908da62644 /crates/ra_ide_api/src/completion | |
parent | 05ed6c548a7672e2c9472276a652c374a5d2a212 (diff) |
remove Cancelable from Ty
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_dot.rs | 7 |
1 files changed, 3 insertions, 4 deletions
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 | |||
17 | }; | 17 | }; |
18 | let receiver_ty = infer_result[expr].clone(); | 18 | let receiver_ty = infer_result[expr].clone(); |
19 | if !ctx.is_call { | 19 | if !ctx.is_call { |
20 | complete_fields(acc, ctx, receiver_ty.clone())?; | 20 | complete_fields(acc, ctx, receiver_ty.clone()); |
21 | } | 21 | } |
22 | complete_methods(acc, ctx, receiver_ty)?; | 22 | complete_methods(acc, ctx, receiver_ty)?; |
23 | Ok(()) | 23 | Ok(()) |
24 | } | 24 | } |
25 | 25 | ||
26 | fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) -> Cancelable<()> { | 26 | fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) { |
27 | for receiver in receiver.autoderef(ctx.db) { | 27 | for receiver in receiver.autoderef(ctx.db) { |
28 | match receiver { | 28 | match receiver { |
29 | Ty::Adt { def_id, .. } => { | 29 | Ty::Adt { def_id, .. } => { |
@@ -35,7 +35,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) | |||
35 | field.name().to_string(), | 35 | field.name().to_string(), |
36 | ) | 36 | ) |
37 | .kind(CompletionItemKind::Field) | 37 | .kind(CompletionItemKind::Field) |
38 | .set_detail(field.ty(ctx.db)?.map(|ty| ty.to_string())) | 38 | .set_detail(field.ty(ctx.db).map(|ty| ty.to_string())) |
39 | .add_to(acc); | 39 | .add_to(acc); |
40 | } | 40 | } |
41 | } | 41 | } |
@@ -53,7 +53,6 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) | |||
53 | _ => {} | 53 | _ => {} |
54 | }; | 54 | }; |
55 | } | 55 | } |
56 | Ok(()) | ||
57 | } | 56 | } |
58 | 57 | ||
59 | fn complete_methods( | 58 | fn complete_methods( |