diff options
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 | 3 |
1 files changed, 1 insertions, 2 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 c8b13b7b3..e6cd50bc1 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 | |||
@@ -1,4 +1,3 @@ | |||
1 | use hir::db::HirDatabase; | ||
2 | use ra_fmt::unwrap_trivial_block; | 1 | use ra_fmt::unwrap_trivial_block; |
3 | use ra_syntax::{ | 2 | use ra_syntax::{ |
4 | ast::{self, make}, | 3 | ast::{self, make}, |
@@ -34,7 +33,7 @@ use ast::edit::IndentLevel; | |||
34 | // } | 33 | // } |
35 | // } | 34 | // } |
36 | // ``` | 35 | // ``` |
37 | pub(crate) fn replace_if_let_with_match(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { | 36 | pub(crate) fn replace_if_let_with_match(ctx: AssistCtx) -> Option<Assist> { |
38 | let if_expr: ast::IfExpr = ctx.find_node_at_offset()?; | 37 | let if_expr: ast::IfExpr = ctx.find_node_at_offset()?; |
39 | let cond = if_expr.condition()?; | 38 | let cond = if_expr.condition()?; |
40 | let pat = cond.pat()?; | 39 | let pat = cond.pat()?; |