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/move_guard.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/move_guard.rs')
-rw-r--r-- | crates/ra_assists/src/assists/move_guard.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/assists/move_guard.rs b/crates/ra_assists/src/assists/move_guard.rs index b49ec6172..41a31e677 100644 --- a/crates/ra_assists/src/assists/move_guard.rs +++ b/crates/ra_assists/src/assists/move_guard.rs | |||
@@ -41,7 +41,7 @@ pub(crate) fn move_guard_to_arm_body(ctx: AssistCtx<impl HirDatabase>) -> Option | |||
41 | let arm_expr = match_arm.expr()?; | 41 | let arm_expr = match_arm.expr()?; |
42 | let buf = format!("if {} {{ {} }}", guard_conditions.syntax().text(), arm_expr.syntax().text()); | 42 | let buf = format!("if {} {{ {} }}", guard_conditions.syntax().text(), arm_expr.syntax().text()); |
43 | 43 | ||
44 | ctx.add_assist(AssistId("move_guard_to_arm_body"), "move guard to arm body", |edit| { | 44 | ctx.add_assist(AssistId("move_guard_to_arm_body"), "Move guard to arm body", |edit| { |
45 | edit.target(guard.syntax().text_range()); | 45 | edit.target(guard.syntax().text_range()); |
46 | let offseting_amount = match space_before_guard.and_then(|it| it.into_token()) { | 46 | let offseting_amount = match space_before_guard.and_then(|it| it.into_token()) { |
47 | Some(tok) => { | 47 | Some(tok) => { |
@@ -111,7 +111,7 @@ pub(crate) fn move_arm_cond_to_match_guard(ctx: AssistCtx<impl HirDatabase>) -> | |||
111 | 111 | ||
112 | ctx.add_assist( | 112 | ctx.add_assist( |
113 | AssistId("move_arm_cond_to_match_guard"), | 113 | AssistId("move_arm_cond_to_match_guard"), |
114 | "move condition to match guard", | 114 | "Move condition to match guard", |
115 | |edit| { | 115 | |edit| { |
116 | edit.target(if_expr.syntax().text_range()); | 116 | edit.target(if_expr.syntax().text_range()); |
117 | let then_only_expr = then_block.block().and_then(|it| it.statements().next()).is_none(); | 117 | let then_only_expr = then_block.block().and_then(|it| it.statements().next()).is_none(); |