aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/flip_binexpr.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-04-01 10:30:25 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-04-01 10:30:25 +0100
commit42a883f06c28ddeab22e5703a578f19110dde7f3 (patch)
treefe57697b54ccfb791fe96c13cb553a8570516270 /crates/ra_assists/src/flip_binexpr.rs
parentdec9bde10868b5e459535449476d17a6a0987b3e (diff)
parent9e213385c9d06db3c8ca20812779e2b8f8ad2c71 (diff)
Merge #1078
1078: rewrite syntax trees r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/flip_binexpr.rs')
-rw-r--r--crates/ra_assists/src/flip_binexpr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/flip_binexpr.rs b/crates/ra_assists/src/flip_binexpr.rs
index ec377642e..02d27f66d 100644
--- a/crates/ra_assists/src/flip_binexpr.rs
+++ b/crates/ra_assists/src/flip_binexpr.rs
@@ -8,7 +8,7 @@ pub(crate) fn flip_binexpr(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assis
8 let expr = ctx.node_at_offset::<BinExpr>()?; 8 let expr = ctx.node_at_offset::<BinExpr>()?;
9 let lhs = expr.lhs()?.syntax(); 9 let lhs = expr.lhs()?.syntax();
10 let rhs = expr.rhs()?.syntax(); 10 let rhs = expr.rhs()?.syntax();
11 let op_range = expr.op()?.range(); 11 let op_range = expr.op_token()?.range();
12 // The assist should be applied only if the cursor is on the operator 12 // The assist should be applied only if the cursor is on the operator
13 let cursor_in_range = ctx.frange.range.is_subrange(&op_range); 13 let cursor_in_range = ctx.frange.range.is_subrange(&op_range);
14 if !cursor_in_range { 14 if !cursor_in_range {