Skip to content

BytesMut::zeroed doc header improvement #713

@juliusl

Description

@juliusl

It would be great if the doc header included a note:

/// Creates a new `BytesMut`, which is initialized with zero.
///  
/// **Note**: The length of the buffer will be set to `len`

It's easy to miss that the argument is len which corresponds to the actual len, was scratching my head a bunch until I added sanity checks to discover this.

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