aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-04-26 17:02:00 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-04-26 17:02:00 +0100
commit1dd3d9bc2d328e164c594f3d2022dcf174f907a9 (patch)
treee4d7f73b0253fb882ac043dd75a111fcaf487c27 /crates/ra_parser/src/grammar
parent42c4e0f378faeabd425392d4a7a7839bd7e8ac2f (diff)
parentd8649c1af86118dea6b6340c999b5864a8d55279 (diff)
Merge #1212
1212: Clippy cleanups r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ra_parser/src/grammar')
-rw-r--r--crates/ra_parser/src/grammar/expressions.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs
index 8df9035e9..9fe529f53 100644
--- a/crates/ra_parser/src/grammar/expressions.rs
+++ b/crates/ra_parser/src/grammar/expressions.rs
@@ -252,12 +252,12 @@ fn expr_bp(
252 // `newly_dollar_open` is a flag indicated that dollar is just closed after lhs, e.g. 252 // `newly_dollar_open` is a flag indicated that dollar is just closed after lhs, e.g.
253 // `$1$ + a` 253 // `$1$ + a`
254 // We use this flag to skip handling it. 254 // We use this flag to skip handling it.
255 let mut newly_dollar_open = false; 255 let mut newly_dollar_open = if p.at_l_dollar() {
256
257 if p.at_l_dollar() {
258 *dollar_lvl += p.eat_l_dollars(); 256 *dollar_lvl += p.eat_l_dollars();
259 newly_dollar_open = true; 257 true
260 } 258 } else {
259 false
260 };
261 261
262 let mut lhs = match lhs(p, r, dollar_lvl) { 262 let mut lhs = match lhs(p, r, dollar_lvl) {
263 Some((lhs, blocklike)) => { 263 Some((lhs, blocklike)) => {
@@ -535,7 +535,7 @@ fn path_expr(p: &mut Parser, r: Restrictions) -> (CompletedMarker, BlockLike) {
535 } 535 }
536 EXCL => { 536 EXCL => {
537 let block_like = items::macro_call_after_excl(p); 537 let block_like = items::macro_call_after_excl(p);
538 return (m.complete(p, MACRO_CALL), block_like); 538 (m.complete(p, MACRO_CALL), block_like)
539 } 539 }
540 _ => (m.complete(p, PATH_EXPR), BlockLike::NotBlock), 540 _ => (m.complete(p, PATH_EXPR), BlockLike::NotBlock),
541 } 541 }