Add Reader::skip_exact method#19025
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. |
|
Oops, please have a look at my half-baked and stale PR #18137 I didn't have progress in it because I was thinking too much about #13989 (comment) My current plan is to make |
|
I'm not familiar enough with the direction that this API is taking to judge this particular pull request. @alexcrichton or @aturon, would one of you take this up please? |
|
Here's a thought. A good optimisation for the default implementation might be ie. read to the stack if we're only reading a small amount (I suspect people will often only be skipping a few bytes here or there). Not sure how to pick a good value for |
|
All you need is |
|
@canndrew I'm sorry for the long delay getting back to you on this. My basic feeling is that this is a relatively rare thing to need to do, and looping with |
|
To echo @aturon and my similar comment in @nodakai's PR, I'm going to close this for now in expectation of the upcoming |
This implements the fix for #19022