Skip to content

BufWriter::into_inner doesn't flush #313

Closed
@yoshuawuyts

Description

@yoshuawuyts

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions