Skip to content

Misleading documentation on into_inner methods of I/O writers #23386

Closed
@mzabaluev

Description

@mzabaluev

The documentation of into_inner method on BufWriter, BufStream, and LineWriter says that the internal buffer is 'flushed' before the underlying writer is returned. This may confuse the reader into thinking that flush is called on the underlying writer. The current implementation does not perform such deep flushing, and it really shouldn't. Rather, the documentation should make clear that the buffered data are only written out, so it's the responsibility of the consumer of the returned writer to eventually flush it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions