Skip to content

Misleading read_ready impl for VecDeque and &[u8] #730

@skilvingr

Description

@skilvingr

Hi, I'm currently using a VecDeque to test a crate built around this crate.

At the moment the method read_ready returns always Ok(true), even if the queue is empty.
This results in possible infinite loops if a code uses a while loop with read_ready as exit condition.

I think that the returned value should depend upon the occupied space for both VecDeque and &[u8] implementations.

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