Skip to content

The naming of BufReader/BufWriter and MemReader/MemWriter is confusing #12498

Closed
@mneumann

Description

@mneumann

It is unclear that MemReader operates on an owned vector while BufReader on a borrowed vector. For the reader I think there is no difference between a MemReader and a BufReader. MemReader::new([1u8]) can be replaced by BufReader::new([1u8].as_slice()). Only the MemWriter and BufWriter differ in that MemWriter can grow the buffer.

How about this naming: BufReader, BufWriter, GrowableBufWriter?

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