diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-20 15:03:11 +0100 | 
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-20 20:23:03 +0100 | 
| commit | ad00e9188766b8accdce93b264ed8b13aa12a820 (patch) | |
| tree | 56c35b1bbe0b7372de57d7a0847674d1845a5ec7 /src/librustc_parse/parser/expr.rs | |
| parent | 951a3661adf95b58a351b1ee10fe508e37dc17a6 (diff) | |
| download | rust-ad00e9188766b8accdce93b264ed8b13aa12a820.tar.gz rust-ad00e9188766b8accdce93b264ed8b13aa12a820.zip | |
remove redundant returns (clippy::needless_return)
Diffstat (limited to 'src/librustc_parse/parser/expr.rs')
| -rw-r--r-- | src/librustc_parse/parser/expr.rs | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs index c65e99842c5..5dac461441d 100644 --- a/src/librustc_parse/parser/expr.rs +++ b/src/librustc_parse/parser/expr.rs @@ -996,7 +996,7 @@ impl<'a> Parser<'a> { let expr = self.mk_expr(lo.to(self.prev_token.span), ExprKind::Lit(literal), attrs); self.maybe_recover_from_bad_qpath(expr, true) } - None => return Err(self.expected_expression_found()), + None => Err(self.expected_expression_found()), } } @@ -1713,7 +1713,7 @@ impl<'a> Parser<'a> { } let hi = self.token.span; self.bump(); - return Ok(self.mk_expr(lo.to(hi), ExprKind::Match(scrutinee, arms), attrs)); + Ok(self.mk_expr(lo.to(hi), ExprKind::Match(scrutinee, arms), attrs)) } pub(super) fn parse_arm(&mut self) -> PResult<'a, Arm> { | 
