about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-04-07 17:59:11 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2024-04-11 21:09:52 +0200
commitf9ca2135101831f9dc240201e3c0e807fa2d1b1b (patch)
tree053afb4ae26766f842d8bac2d4a7c233cb7f1f83 /compiler/rustc_parse/src/parser/expr.rs
parentdf7daa815f4047a1cfe24ecfbc12cfd4f40fa928 (diff)
downloadrust-f9ca2135101831f9dc240201e3c0e807fa2d1b1b.tar.gz
rust-f9ca2135101831f9dc240201e3c0e807fa2d1b1b.zip
remove some things that do not need to be
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 012285e4644..00947a4c585 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -3585,8 +3585,7 @@ impl<'a> Parser<'a> {
 
             match self.expect_one_of(&[token::Comma], &[token::CloseDelim(close_delim)]) {
                 Ok(_) => {
-                    if let Some(f) =
-                        parsed_field.or_else(|guar| field_ident(self, guar).ok_or(guar)).ok()
+                    if let Ok(f) = parsed_field.or_else(|guar| field_ident(self, guar).ok_or(guar))
                     {
                         // Only include the field if there's no parse error for the field name.
                         fields.push(f);