aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2019-06-03 15:00:19 +0100
committerAlan Du <[email protected]>2019-06-04 08:00:58 +0100
commit573a6bb5c9c61bff42100a8efb576e4ad97425e8 (patch)
treee40a397e99684820782d6cbde97152e1258ce29e
parent07ebf5528eec0b054655a11e426e7f0041bcdf82 (diff)
Fix clippy::match_bool
-rw-r--r--crates/ra_parser/src/grammar.rs6
1 files 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) {
87} 87}
88 88
89pub(crate) fn stmt(p: &mut Parser, with_semi: bool) { 89pub(crate) fn stmt(p: &mut Parser, with_semi: bool) {
90 let with_semi = match with_semi { 90 let with_semi =
91 true => expressions::StmtWithSemi::Yes, 91 if with_semi { expressions::StmtWithSemi::Yes } else { expressions::StmtWithSemi::No };
92 false => expressions::StmtWithSemi::No,
93 };
94 92
95 expressions::stmt(p, with_semi) 93 expressions::stmt(p, with_semi)
96} 94}