Skip to content

Commit

Permalink
CallbackResults now use Token::make_error
Browse files Browse the repository at this point in the history
  • Loading branch information
mysteriouslyseeing committed Dec 11, 2024
1 parent ac45573 commit 6ae71c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl<'s, T: Logos<'s>> CallbackResult<'s, (), T> for bool {
{
match self {
true => lex.set(Ok(c(()))),
false => lex.set(Err(T::Error::default())),
false => T::make_error(lex),
}
}
}
Expand All @@ -85,7 +85,7 @@ impl<'s, P, T: Logos<'s>> CallbackResult<'s, P, T> for Option<P> {
{
match self {
Some(product) => lex.set(Ok(c(product))),
None => lex.set(Err(T::Error::default())),
None => T::make_error(lex),
}
}
}
Expand Down

0 comments on commit 6ae71c4

Please sign in to comment.