diff options
author | Aleksey Kladov <[email protected]> | 2020-08-21 18:12:38 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-21 18:14:05 +0100 |
commit | 863b1fb731e797f02daeac87a94d40a34222a062 (patch) | |
tree | 7a3ae3553ad1c97ad4ac70d8b7126ee0ec5343ad /crates/assists/src/handlers/replace_unwrap_with_match.rs | |
parent | df54561a689a9eb7b1962b69a397a1221200c116 (diff) |
:arrow_up: ungrammar
Diffstat (limited to 'crates/assists/src/handlers/replace_unwrap_with_match.rs')
-rw-r--r-- | crates/assists/src/handlers/replace_unwrap_with_match.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/assists/src/handlers/replace_unwrap_with_match.rs b/crates/assists/src/handlers/replace_unwrap_with_match.rs index 9705f11b7..4043c219c 100644 --- a/crates/assists/src/handlers/replace_unwrap_with_match.rs +++ b/crates/assists/src/handlers/replace_unwrap_with_match.rs | |||
@@ -42,7 +42,7 @@ pub(crate) fn replace_unwrap_with_match(acc: &mut Assists, ctx: &AssistContext) | |||
42 | if name.text() != "unwrap" { | 42 | if name.text() != "unwrap" { |
43 | return None; | 43 | return None; |
44 | } | 44 | } |
45 | let caller = method_call.expr()?; | 45 | let caller = method_call.receiver()?; |
46 | let ty = ctx.sema.type_of_expr(&caller)?; | 46 | let ty = ctx.sema.type_of_expr(&caller)?; |
47 | let happy_variant = TryEnum::from_ty(&ctx.sema, &ty)?.happy_case(); | 47 | let happy_variant = TryEnum::from_ty(&ctx.sema, &ty)?.happy_case(); |
48 | let target = method_call.syntax().text_range(); | 48 | let target = method_call.syntax().text_range(); |