diff options
author | Alan Du <[email protected]> | 2018-10-16 16:51:58 +0100 |
---|---|---|
committer | Alan Du <[email protected]> | 2018-10-18 00:42:23 +0100 |
commit | d493a4476c2059924d032fbf01dda091601f9667 (patch) | |
tree | 74c1249cba67c8c9824e618fcdea53b97b571a7b /crates/ra_syntax/src/grammar/patterns.rs | |
parent | 5db663d61fb8b006e3b84ef3bcc9cddbe94e5f49 (diff) |
clippy: Use if lets and remove redundant returns
Diffstat (limited to 'crates/ra_syntax/src/grammar/patterns.rs')
-rw-r--r-- | crates/ra_syntax/src/grammar/patterns.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/grammar/patterns.rs b/crates/ra_syntax/src/grammar/patterns.rs index 9d35dbb3d..10fa0e0be 100644 --- a/crates/ra_syntax/src/grammar/patterns.rs +++ b/crates/ra_syntax/src/grammar/patterns.rs | |||
@@ -49,9 +49,8 @@ fn atom_pat(p: &mut Parser, recovery_set: TokenSet) -> Option<CompletedMarker> { | |||
49 | // "hello" => (), | 49 | // "hello" => (), |
50 | // } | 50 | // } |
51 | // } | 51 | // } |
52 | match expressions::literal(p) { | 52 | if let Some(m) = expressions::literal(p) { |
53 | Some(m) => return Some(m), | 53 | return Some(m); |
54 | None => (), | ||
55 | } | 54 | } |
56 | 55 | ||
57 | let m = match la0 { | 56 | let m = match la0 { |