diff options
author | Aleksey Kladov <[email protected]> | 2020-05-07 16:32:01 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-07 16:32:01 +0100 |
commit | 1e790ea3149f085e49cb66e6a052920f72da01e9 (patch) | |
tree | 0a036aeb11785ab638c809614daa66e5dd1133b4 /crates/ra_assists/src/handlers/merge_match_arms.rs | |
parent | 28fcff125a73ab2fc4aeaa100fc472af5178db20 (diff) |
Simplify
Diffstat (limited to 'crates/ra_assists/src/handlers/merge_match_arms.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/merge_match_arms.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/handlers/merge_match_arms.rs b/crates/ra_assists/src/handlers/merge_match_arms.rs index cfe4df47b..d4e38aa6a 100644 --- a/crates/ra_assists/src/handlers/merge_match_arms.rs +++ b/crates/ra_assists/src/handlers/merge_match_arms.rs | |||
@@ -45,7 +45,7 @@ pub(crate) fn merge_match_arms(acc: &mut Assists, ctx: &AssistContext) -> Option | |||
45 | InExpr(TextSize), | 45 | InExpr(TextSize), |
46 | InPat(TextSize), | 46 | InPat(TextSize), |
47 | } | 47 | } |
48 | let cursor_pos = ctx.frange.range.start(); | 48 | let cursor_pos = ctx.offset(); |
49 | let cursor_pos = if current_expr.syntax().text_range().contains(cursor_pos) { | 49 | let cursor_pos = if current_expr.syntax().text_range().contains(cursor_pos) { |
50 | CursorPos::InExpr(current_text_range.end() - cursor_pos) | 50 | CursorPos::InExpr(current_text_range.end() - cursor_pos) |
51 | } else { | 51 | } else { |