clippy: Use if lets and remove redundant returns

This commit is contained in:
Alan Du
2018-10-16 11:51:58 -04:00
parent 5db663d61f
commit d493a4476c
11 changed files with 22 additions and 29 deletions

View File

@@ -49,9 +49,8 @@ fn atom_pat(p: &mut Parser, recovery_set: TokenSet) -> Option<CompletedMarker> {
// "hello" => (),
// }
// }
match expressions::literal(p) {
Some(m) => return Some(m),
None => (),
if let Some(m) = expressions::literal(p) {
return Some(m);
}
let m = match la0 {