-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
BufReader<impl AsyncWrite + AsyncSeek>
panics when calling write_all
and immediately seek
#4875
Comments
BufReader<impl AsyncWrite>
panics when calling write_all
and immediately seek
BufReader<impl AsyncWrite + AsyncSeek>
panics when calling write_all
and immediately seek
One way to fix this is to have |
The documentation for |
I was looking into this issue and opened a PR at #4897 to change the panic to an error. Although the File impl seems incorrect, the behavior between tokio/tokio/src/io/util/buf_writer.rs Lines 244 to 245 in 9d9488d
Do you think it makes sense to also change |
Actually, I realize now that |
Looking into Even if the |
If we were to do that, then we would need to add an additional field to |
It looks like the PR above (#4897) has been merged. When I run the sample code from the initial post against version |
Yes, thanks for pointing that out. |
Version
tokio v1.19.2 and v1.20.1
tokio-util v0.7.3
Platform
macOS 12.3 x86_64
Description
The following code panics:
The text was updated successfully, but these errors were encountered: