diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-16 15:02:19 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-16 15:03:25 +1000 |
| commit | 2f305ff460862e18b67db2faa11b85ab223d4e60 (patch) | |
| tree | 077691f76a6b69105a543646e739d407038cd44e /compiler/rustc_parse/src | |
| parent | f8e4ac0760216724f69b1ebc369bf03da56a7520 (diff) | |
| download | rust-2f305ff460862e18b67db2faa11b85ab223d4e60.tar.gz rust-2f305ff460862e18b67db2faa11b85ab223d4e60.zip | |
Remove an unnecessary `?`.
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index d2fea5583b8..994e7c5d2db 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -128,14 +128,10 @@ impl<'a> Parser<'a> { Some(item.into_inner()) }); - let item = - self.collect_tokens_trailing_token(attrs, force_collect, |this: &mut Self, attrs| { - let item = - this.parse_item_common_(attrs, mac_allowed, attrs_allowed, fn_parse_mode); - Ok((item?, TrailingToken::None)) - })?; - - Ok(item) + self.collect_tokens_trailing_token(attrs, force_collect, |this, attrs| { + let item = this.parse_item_common_(attrs, mac_allowed, attrs_allowed, fn_parse_mode)?; + Ok((item, TrailingToken::None)) + }) } fn parse_item_common_( |
