From 6344a7f362b19eaf71547766135ece160aa3389e Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Mon, 10 Aug 2020 15:05:01 +0300 Subject: Fix clippy warnings --- crates/ra_parser/src/grammar/expressions/atom.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'crates/ra_parser/src/grammar') diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index 0b01d3bc6..ca6569c9f 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs @@ -243,12 +243,10 @@ fn lambda_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