From 573a6bb5c9c61bff42100a8efb576e4ad97425e8 Mon Sep 17 00:00:00 2001 From: Alan Du Date: Mon, 3 Jun 2019 10:00:19 -0400 Subject: Fix clippy::match_bool --- crates/ra_parser/src/grammar.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs index cf603eba1..5997636d6 100644 --- a/crates/ra_parser/src/grammar.rs +++ b/crates/ra_parser/src/grammar.rs @@ -87,10 +87,8 @@ pub(crate) fn pattern(p: &mut Parser) { } pub(crate) fn stmt(p: &mut Parser, with_semi: bool) { - let with_semi = match with_semi { - true => expressions::StmtWithSemi::Yes, - false => expressions::StmtWithSemi::No, - }; + let with_semi = + if with_semi { expressions::StmtWithSemi::Yes } else { expressions::StmtWithSemi::No }; expressions::stmt(p, with_semi) } -- cgit v1.2.3