Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

peek_read should be &mut self, not &self #555

@AlexApps99

Description

@AlexApps99

I'm currently implementing Reader for a newtype over VecDeque.

To implement peek_read, I need to make the VecDeque contiguous with make_contiguous, which mutates in order to make the data a single contiguous slice.

I don't see any reason why peek_read should require being immutable, as every context I have seen it used in is followed by consume.

Would it be OK to change this in a PR?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions