Skip to content

impl Reader/Writer for Vec<u8> and &[u8], get rid of {Buf,Mem}{Reader,Writer} #15946

Closed
@erickt

Description

@erickt
Contributor

If we end up removing Seek from MemWriter as suggested in #15915, there's not much reason left to having an explicit MemWriter. Instead, we could directly implement Writer on Vec<u8>. Likewise, we could do the same with BufWriter/BufReader and &[u8] if we take advantage of the fact that neither of them return the slice, so they can shrink the slice as it is read or written to.

Activity

masklinn

masklinn commented on Dec 7, 2014

@masklinn
Contributor

Hasn't this been mostly fixed by #18885 (Writer for Vec) and #18980 (Reader for &[u8], Writer for &mut [u8])?

steveklabnik

steveklabnik commented on Jan 24, 2015

@steveklabnik
Member

Yes, and anything left would be an RFC now.

added a commit that references this issue on Dec 4, 2023

Auto merge of rust-lang#15946 - roife:master, r=Veykril

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

        @masklinn@steveklabnik@erickt

        Issue actions

          impl Reader/Writer for Vec<u8> and &[u8], get rid of {Buf,Mem}{Reader,Writer} · Issue #15946 · rust-lang/rust