We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38114ff commit 3599fd3Copy full SHA for 3599fd3
src/librustc_parse/parser/stmt.rs
@@ -217,13 +217,7 @@ impl<'a> Parser<'a> {
217
218
/// Parses the RHS of a local variable declaration (e.g., '= 14;').
219
fn parse_initializer(&mut self, skip_eq: bool) -> PResult<'a, Option<P<Expr>>> {
220
- if self.eat(&token::Eq) {
221
- Ok(Some(self.parse_expr()?))
222
- } else if skip_eq {
223
224
- } else {
225
- Ok(None)
226
- }
+ if self.eat(&token::Eq) || skip_eq { Ok(Some(self.parse_expr()?)) } else { Ok(None) }
227
}
228
229
/// Parses a block. No inner attributes are allowed.
0 commit comments