Skip to content

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

Closed
@mneumann

Description

@mneumann
Contributor

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?

Activity

steveklabnik

steveklabnik commented on Jan 23, 2015

@steveklabnik
Member
aturon

aturon commented on Jan 23, 2015

@aturon
Member

This will be resolved during io reform.

alexcrichton

alexcrichton commented on Feb 11, 2015

@alexcrichton
Member

These have all been fixed with the new Cursor type.

added a commit that references this issue on Mar 21, 2024

Auto merge of rust-lang#12498 - y21:issue12489, r=blyxyas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @steveklabnik@mneumann@alexcrichton@aturon

        Issue actions

          The naming of BufReader/BufWriter and MemReader/MemWriter is confusing · Issue #12498 · rust-lang/rust