aboutsummaryrefslogtreecommitdiff
path: root/crates/parser/src/grammar
diff options
context:
space:
mode:
authorClemens Wasser <[email protected]>2021-06-03 10:45:10 +0100
committerClemens Wasser <[email protected]>2021-06-03 10:46:03 +0100
commit3c6dc0f89dc9c2902d71e8639b4913917a396f8a (patch)
tree6a1acfe280a8e9369a753b4e7bb829b8b9ff6317 /crates/parser/src/grammar
parente8e14e1b13b76aaa643bc3beffb9c52bc5228d24 (diff)
Apply a few clippy suggestions
Diffstat (limited to 'crates/parser/src/grammar')
-rw-r--r--crates/parser/src/grammar/expressions/atom.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/parser/src/grammar/expressions/atom.rs b/crates/parser/src/grammar/expressions/atom.rs
index 269f223e6..abdfca1fe 100644
--- a/crates/parser/src/grammar/expressions/atom.rs
+++ b/crates/parser/src/grammar/expressions/atom.rs
@@ -252,12 +252,10 @@ fn closure_expr(p: &mut Parser) -> CompletedMarker {
252 // test lambda_ret_block 252 // test lambda_ret_block
253 // fn main() { || -> i32 { 92 }(); } 253 // fn main() { || -> i32 { 92 }(); }
254 block_expr(p); 254 block_expr(p);
255 } else if p.at_ts(EXPR_FIRST) {
256 expr(p);
255 } else { 257 } else {
256 if p.at_ts(EXPR_FIRST) { 258 p.error("expected expression");
257 expr(p);
258 } else {
259 p.error("expected expression");
260 }
261 } 259 }
262 m.complete(p, CLOSURE_EXPR) 260 m.complete(p, CLOSURE_EXPR)
263} 261}