diff options
author | Aleksey Kladov <[email protected]> | 2020-02-06 15:58:57 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-02-06 16:12:02 +0000 |
commit | cf812c12d1ac7944d1c18877ee93bea02d91e99f (patch) | |
tree | 71e13733941e2c0520cfe5d16fb00f428f3233da /crates/ra_assists/src/assists/replace_if_let_with_match.rs | |
parent | f8965ffafd5cf467b3f0482ca962ba2bfd090161 (diff) |
Assists are not generic
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()?; |