aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar/expressions
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2018-10-16 16:51:58 +0100
committerAlan Du <[email protected]>2018-10-18 00:42:23 +0100
commitd493a4476c2059924d032fbf01dda091601f9667 (patch)
tree74c1249cba67c8c9824e618fcdea53b97b571a7b /crates/ra_syntax/src/grammar/expressions
parent5db663d61fb8b006e3b84ef3bcc9cddbe94e5f49 (diff)
clippy: Use if lets and remove redundant returns
Diffstat (limited to 'crates/ra_syntax/src/grammar/expressions')
-rw-r--r--crates/ra_syntax/src/grammar/expressions/atom.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/grammar/expressions/atom.rs b/crates/ra_syntax/src/grammar/expressions/atom.rs
index 11f766d33..04087fd60 100644
--- a/crates/ra_syntax/src/grammar/expressions/atom.rs
+++ b/crates/ra_syntax/src/grammar/expressions/atom.rs
@@ -62,9 +62,8 @@ pub(super) const ATOM_EXPR_FIRST: TokenSet = token_set_union![
62const EXPR_RECOVERY_SET: TokenSet = token_set![LET_KW]; 62const EXPR_RECOVERY_SET: TokenSet = token_set![LET_KW];
63 63
64pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<CompletedMarker> { 64pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<CompletedMarker> {
65 match literal(p) { 65 if let Some(m) = literal(p) {
66 Some(m) => return Some(m), 66 return Some(m);
67 None => (),
68 } 67 }
69 if paths::is_path_start(p) || p.at(L_ANGLE) { 68 if paths::is_path_start(p) || p.at(L_ANGLE) {
70 return Some(path_expr(p, r)); 69 return Some(path_expr(p, r));