From 3c6dc0f89dc9c2902d71e8639b4913917a396f8a Mon Sep 17 00:00:00 2001 From: Clemens Wasser Date: Thu, 3 Jun 2021 11:45:10 +0200 Subject: Apply a few clippy suggestions --- crates/parser/src/grammar/expressions/atom.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'crates/parser/src/grammar/expressions') 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 { // test lambda_ret_block // fn main() { || -> i32 { 92 }(); } block_expr(p); + } else if p.at_ts(EXPR_FIRST) { + expr(p); } else { - if p.at_ts(EXPR_FIRST) { - expr(p); - } else { - p.error("expected expression"); - } + p.error("expected expression"); } m.complete(p, CLOSURE_EXPR) } -- cgit v1.2.3