-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't read to EOF on BufReader returned from get_descriptor()
#71
Comments
This is related to ostreedev/ostree-rs-ext#657 |
We chatted about this realtime but the basic issue right now is that the proxy is the thing doing checksum verification, and I didn't want to present "checksum mismatch" as "final error on read". So today The other thing one needs to understand is that in async rust futures don't make progress unless polled and when doing
The |
That makes a lot of sense, which is why I make sure to await |
fwiw, I'd find the "final error on read" approach to be quite reasonable. I guess your reasons there are something like not wanting to have to shoe-horn the error into the standard io error type? I think I read somewhere that you can optionally chain additional errors there somehow...? |
If you call
ImageProxy::get_descriptor()
and try to call.read_to_end()
on the returnedimpl AsyncBufRead
then you'll stall forever.Looking at the example code in the repository, you can see that something like this works, however:
It would be cool if either:
The text was updated successfully, but these errors were encountered: