Skip to content

Implement range indexing #71

@musjj

Description

@musjj

It should be possible to index a NonEmpty with a Range{,From,To,Full}:

fn foo(a: Vec<u8>, b: NonEmpty<u8>) {
    let _ = a[5..];
    let _ = b[5..]; // mismatched types expected type `usize` found struct
                    // `std::ops::RangeFrom<{integer}>`
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions