Skip to content

Documentation incorrect regarding BoundedSequence.is_empty() #411

@imdex-matthew

Description

@imdex-matthew

Documentation incorrectly indicates that you can check a BoundedSequence is empty.

/// // The default bounded sequence is empty
/// assert!(BoundedSequence::<i32, 5>::default().is_empty());

This results in the following error:

thread '...' panicked at library/core/src/panicking.rs:220:5:
unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed isize::MAX

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