From fcd4b0176f1544b389c9b028c547a1dfc92f9a56 Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Wed, 12 Aug 2020 14:08:55 +0300 Subject: Revert style preference-related fixes --- crates/ra_parser/src/grammar/expressions/atom.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'crates/ra_parser') diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index ca6569c9f..0b01d3bc6 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs @@ -243,10 +243,12 @@ 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 { - p.error("expected expression"); + if p.at_ts(EXPR_FIRST) { + expr(p); + } else { + p.error("expected expression"); + } } m.complete(p, CLOSURE_EXPR) } -- cgit v1.2.3