You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by TheNeikos March 25, 2024
Heya!
I have a function that returns a PResult, but I can't easily use the bits::bits parser because the error traits it requires are not implemented/compatible with PResult's definition:
But ErrorConvert is only implemented for InputError. Since PResult is the 'main' way of using winnow, this means I have to awkwardly specify the Error type using a turbofish. bits has 5 generics (even if I can infer 4 of them).
The text was updated successfully, but these errors were encountered:
epage
changed the title
Improve ergonomics of using winnow::binary::bits::bits with parse_next
ErrorConvert is only implemented for InputError
Oct 3, 2024
Discussed in #498
Originally posted by TheNeikos March 25, 2024
Heya!
I have a function that returns a
PResult
, but I can't easily use thebits::bits
parser because the error traits it requires are not implemented/compatible with PResult's definition:bits
requires that:BitError: ParserError<(Input, usize)> + ErrorConvert<ByteError>
ByteError: ParserError<Input>
But
ErrorConvert
is only implemented forInputError
. Since PResult is the 'main' way of using winnow, this means I have to awkwardly specify the Error type using a turbofish.bits
has 5 generics (even if I can infer 4 of them).So for example an invocation looks like this:
Now, am I doing something wrong? Or is this just a current limitation?
Thanks for any pointers!
Parse Peek
Parse next
The text was updated successfully, but these errors were encountered: