aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/assists/flip_binexpr.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-06 16:50:01 +0000
committerGitHub <[email protected]>2020-02-06 16:50:01 +0000
commit895cdb588314f4e04529d1adf8cd232856497dad (patch)
tree6466cb45c30478eb0c413c25cc6d07cf23d39d3a /crates/ra_assists/src/assists/flip_binexpr.rs
parent8b957caf83b18b3fea153f770bfd0ed979227eff (diff)
parentd1e8b8d134da802eecef5cbcd5486bd542ad75b5 (diff)
Merge #3034
3034: Remove ImportLocator hack r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/assists/flip_binexpr.rs')
-rw-r--r--crates/ra_assists/src/assists/flip_binexpr.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_assists/src/assists/flip_binexpr.rs b/crates/ra_assists/src/assists/flip_binexpr.rs
index 2074087cd..bfcc09e90 100644
--- a/crates/ra_assists/src/assists/flip_binexpr.rs
+++ b/crates/ra_assists/src/assists/flip_binexpr.rs
@@ -1,4 +1,3 @@
1use hir::db::HirDatabase;
2use ra_syntax::ast::{AstNode, BinExpr, BinOp}; 1use ra_syntax::ast::{AstNode, BinExpr, BinOp};
3 2
4use crate::{Assist, AssistCtx, AssistId}; 3use crate::{Assist, AssistCtx, AssistId};
@@ -18,7 +17,7 @@ use crate::{Assist, AssistCtx, AssistId};
18// let _ = 2 + 90; 17// let _ = 2 + 90;
19// } 18// }
20// ``` 19// ```
21pub(crate) fn flip_binexpr(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { 20pub(crate) fn flip_binexpr(ctx: AssistCtx) -> Option<Assist> {
22 let expr = ctx.find_node_at_offset::<BinExpr>()?; 21 let expr = ctx.find_node_at_offset::<BinExpr>()?;
23 let lhs = expr.lhs()?.syntax().clone(); 22 let lhs = expr.lhs()?.syntax().clone();
24 let rhs = expr.rhs()?.syntax().clone(); 23 let rhs = expr.rhs()?.syntax().clone();