aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/replace_if_let_with_match.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/replace_if_let_with_match.rs')
-rw-r--r--crates/ra_assists/src/replace_if_let_with_match.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/replace_if_let_with_match.rs b/crates/ra_assists/src/replace_if_let_with_match.rs
index 5de6aa266..c0bf6d235 100644
--- a/crates/ra_assists/src/replace_if_let_with_match.rs
+++ b/crates/ra_assists/src/replace_if_let_with_match.rs
@@ -17,9 +17,9 @@ pub(crate) fn replace_if_let_with_match(mut ctx: AssistCtx<impl HirDatabase>) ->
17 17
18 ctx.add_action(AssistId("replace_if_let_with_match"), "replace with match", |edit| { 18 ctx.add_action(AssistId("replace_if_let_with_match"), "replace with match", |edit| {
19 let match_expr = build_match_expr(expr, pat, then_block, else_block); 19 let match_expr = build_match_expr(expr, pat, then_block, else_block);
20 edit.target(if_expr.syntax().range()); 20 edit.target(if_expr.syntax().text_range());
21 edit.replace_node_and_indent(if_expr.syntax(), match_expr); 21 edit.replace_node_and_indent(if_expr.syntax(), match_expr);
22 edit.set_cursor(if_expr.syntax().range().start()) 22 edit.set_cursor(if_expr.syntax().text_range().start())
23 }); 23 });
24 24
25 ctx.build() 25 ctx.build()