Marwes/combine

combine::parser::byte::bytes can't be used on non RangeStream streams

Closed this issue · 2 comments

Hello,

Since combine::parser::byte::bytes needs an input with Range=&[u8], I can't use it with a non RangeStream stream. There is the combine::parser::range::range that can be used for the RangeStreams, so it would not be a regression to change the Range of the bytes parser's input to u8.

The reason it takes a range is because the input &[u8] is used in the error. If you do not have a RangeStream then I recommend that the Range type is &'static [u8] instead of u8 (which I used to recommend). Does that work for you?

https://docs.rs/combine/4.0.0-beta.1/combine/stream/struct.ReadStream.html#implementations

Yes it works thank you