Skip to content

Buf::try_advance support #786

Open
Open
@Tom01098

Description

@Tom01098

Buf::advance is a required method and panics if it runs out of bytes. It would be useful to have a similar functionality which doesn't panic, returning a TryGetError.

Buf::try_advance could be the required method instead of Buf::advance, with the latter being a wrapper on top of the former which just unwraps and panics. This may be undesirable as it would break all 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