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/apply_demorgan.rs | |
parent | f8965ffafd5cf467b3f0482ca962ba2bfd090161 (diff) |
Assists are not generic
Diffstat (limited to 'crates/ra_assists/src/assists/apply_demorgan.rs')
-rw-r--r-- | crates/ra_assists/src/assists/apply_demorgan.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_assists/src/assists/apply_demorgan.rs b/crates/ra_assists/src/assists/apply_demorgan.rs index 666dce4e6..dac6280ad 100644 --- a/crates/ra_assists/src/assists/apply_demorgan.rs +++ b/crates/ra_assists/src/assists/apply_demorgan.rs | |||
@@ -1,5 +1,4 @@ | |||
1 | use super::invert_if::invert_boolean_expression; | 1 | use super::invert_if::invert_boolean_expression; |
2 | use hir::db::HirDatabase; | ||
3 | use ra_syntax::ast::{self, AstNode}; | 2 | use ra_syntax::ast::{self, AstNode}; |
4 | 3 | ||
5 | use crate::{Assist, AssistCtx, AssistId}; | 4 | use crate::{Assist, AssistCtx, AssistId}; |
@@ -23,7 +22,7 @@ use crate::{Assist, AssistCtx, AssistId}; | |||
23 | // if !(x == 4 && y) {} | 22 | // if !(x == 4 && y) {} |
24 | // } | 23 | // } |
25 | // ``` | 24 | // ``` |
26 | pub(crate) fn apply_demorgan(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { | 25 | pub(crate) fn apply_demorgan(ctx: AssistCtx) -> Option<Assist> { |
27 | let expr = ctx.find_node_at_offset::<ast::BinExpr>()?; | 26 | let expr = ctx.find_node_at_offset::<ast::BinExpr>()?; |
28 | let op = expr.op_kind()?; | 27 | let op = expr.op_kind()?; |
29 | let op_range = expr.op_token()?.text_range(); | 28 | let op_range = expr.op_token()?.text_range(); |