Fix clippy::match_bool

This commit is contained in:
Alan Du 2019-06-03 10:00:19 -04:00
parent 07ebf5528e
commit 573a6bb5c9

View file

@ -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)
}