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
BufWriter::IntoInnerreturns the inner type directly. But in std it flushes before returning, returning anIntoInnerErrorif it doesn't work. The same behavior applies for the (still unimplemented)LineWriterstruct.We should ensure it flushes, and convert the function to an
async fnusingret!.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