Skip to content
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

BufWriter::into_inner doesn't flush #313

Closed
yoshuawuyts opened this issue Oct 13, 2019 · 0 comments · Fixed by #315
Closed

BufWriter::into_inner doesn't flush #313

yoshuawuyts opened this issue Oct 13, 2019 · 0 comments · Fixed by #315
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@yoshuawuyts
Copy link
Contributor

yoshuawuyts commented Oct 13, 2019

BufWriter::IntoInner returns the inner type directly. But in std it flushes before returning, returning an IntoInnerError if it doesn't work. The same behavior applies for the (still unimplemented) LineWriter struct.

We should ensure it flushes, and convert the function to an async fn using ret!.

There's prior art on how to create async fns like this in async_std + the stdlib is a good reference on the expected behavior. This should make this fairly straight forward to pick up if anyone's interested. Thanks!

Refs

@yoshuawuyts yoshuawuyts added bug Something isn't working good first issue Good for newcomers labels Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant