diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-01-14 18:16:11 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-01-14 18:16:11 +0000 |
commit | b2ed130ffd9c79de26249a1dfb2a8312d6af12b3 (patch) | |
tree | 0ff98ea233dc9c6202660fb54abd3a9189c9993b /crates/ra_assists/src/assists/replace_if_let_with_match.rs | |
parent | 767ff2c13c5b8c21fcbac072ff1a18a39b956408 (diff) | |
parent | 864434137a3ed17f2a96981780bf7d522e57fd4b (diff) |
Merge #2841
2841: More UI friendly labels r=kjeremy a=kjeremy
Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/assists/replace_if_let_with_match.rs')
-rw-r--r-- | crates/ra_assists/src/assists/replace_if_let_with_match.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/assists/replace_if_let_with_match.rs b/crates/ra_assists/src/assists/replace_if_let_with_match.rs index 3272801ff..c9b62e5ff 100644 --- a/crates/ra_assists/src/assists/replace_if_let_with_match.rs +++ b/crates/ra_assists/src/assists/replace_if_let_with_match.rs | |||
@@ -42,7 +42,7 @@ pub(crate) fn replace_if_let_with_match(ctx: AssistCtx<impl HirDatabase>) -> Opt | |||
42 | ast::ElseBranch::IfExpr(_) => return None, | 42 | ast::ElseBranch::IfExpr(_) => return None, |
43 | }; | 43 | }; |
44 | 44 | ||
45 | ctx.add_assist(AssistId("replace_if_let_with_match"), "replace with match", |edit| { | 45 | ctx.add_assist(AssistId("replace_if_let_with_match"), "Replace with match", |edit| { |
46 | let match_expr = build_match_expr(expr, pat, then_block, else_block); | 46 | let match_expr = build_match_expr(expr, pat, then_block, else_block); |
47 | edit.target(if_expr.syntax().text_range()); | 47 | edit.target(if_expr.syntax().text_range()); |
48 | edit.replace_node_and_indent(if_expr.syntax(), match_expr); | 48 | edit.replace_node_and_indent(if_expr.syntax(), match_expr); |