-
Notifications
You must be signed in to change notification settings - Fork 140
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
encoder: StreamWriter not an io::Write #279
Comments
That seems partially right. The 'at most one write' is not a hard requirement and it's not entirely clear either. See in particular this issue: rust-lang/rust#56889. However, I very much agree on the odd behavior of partial effect on error.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't think
StreamWriter
is actually astd::io::Write
because the docs forwrite
sayand looking at
write
...image-png/src/encoder.rs
Lines 460 to 476 in 26f8f8b
First
buf
always makes it intoself.curr_buf
even if one of thewrite_all
calls errors. Second twowrite_all
s is at least two writes to the wrapped writer and one write might make it to the writer, but a second write might error.The text was updated successfully, but these errors were encountered: