diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-02 11:02:48 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-02 11:02:48 +0100 |
commit | b0d244719323d68905986857844f56d1fa38cac4 (patch) | |
tree | 32ae51ee2d96c526bcfb9eb3f3a8adf18aca39c6 /crates/ra_assists/src/replace_if_let_with_match.rs | |
parent | 370dbc7867719662f26db5684ac82cfc25b5b8cb (diff) | |
parent | ab19ff16e55d4d64445fc2809e52d913ad492040 (diff) |
Merge #1088
1088: add minimal comments r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
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.rs | 4 |
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 230573499..2b451f08d 100644 --- a/crates/ra_assists/src/replace_if_let_with_match.rs +++ b/crates/ra_assists/src/replace_if_let_with_match.rs | |||
@@ -11,8 +11,8 @@ pub(crate) fn replace_if_let_with_match(mut ctx: AssistCtx<impl HirDatabase>) -> | |||
11 | let expr = cond.expr()?; | 11 | let expr = cond.expr()?; |
12 | let then_block = if_expr.then_branch()?; | 12 | let then_block = if_expr.then_branch()?; |
13 | let else_block = match if_expr.else_branch()? { | 13 | let else_block = match if_expr.else_branch()? { |
14 | ast::ElseBranchFlavor::Block(it) => it, | 14 | ast::ElseBranch::Block(it) => it, |
15 | ast::ElseBranchFlavor::IfExpr(_) => return None, | 15 | ast::ElseBranch::IfExpr(_) => return None, |
16 | }; | 16 | }; |
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| { |