Update crates/aiken-lang/src/parser.rs

Co-authored-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com>
This commit is contained in:
Lucas 2023-03-17 09:45:49 -04:00 committed by rvcas
parent 950598b534
commit 22880a300f
No known key found for this signature in database
GPG Key ID: C09B64E263F7D68C
1 changed files with 3 additions and 3 deletions

View File

@ -305,9 +305,9 @@ pub fn validator_parser() -> impl Parser<Token, ast::UntypedDefinition, Error =
ast::UntypedDefinition::Validator(ast::Validator {
doc: None,
// unwrap is safe to do here because
// above we use `.at_least(1)`
fun: functions.next().unwrap(),
fun: functions
.next()
.expect("unwrapping safe because there's 'at_least(1)' function"),
other_fun: functions.next(),
location: Span {
start: span.start,