Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/mbe/src/parser.rs')
| -rw-r--r-- | crates/mbe/src/parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/mbe/src/parser.rs b/crates/mbe/src/parser.rs index 3d9a61dbc8..fad905e97f 100644 --- a/crates/mbe/src/parser.rs +++ b/crates/mbe/src/parser.rs @@ -116,9 +116,9 @@ enum Mode { Template, } -fn next_op<'a>( +fn next_op( first_peeked: &tt::TokenTree, - src: &mut TtIter<'a>, + src: &mut TtIter<'_>, mode: Mode, ) -> Result<Op, ParseError> { let res = match first_peeked { @@ -273,7 +273,7 @@ fn parse_repeat(src: &mut TtIter<'_>) -> Result<(Option<Separator>, RepeatKind), _ => return Err(ParseError::InvalidRepeat), }, }; - return Ok((has_sep.then(|| separator), repeat_kind)); + return Ok((has_sep.then_some(separator), repeat_kind)); } } } |