Skip to content

[ER] Iterator::array_chunks_copy ? #94257

@leonardo-m

Description

@leonardo-m

In Itertools there's Itertools::next_tuple():

https://docs.rs/itertools/0.10.3/itertools/trait.Itertools.html#method.next_tuple

But for the Rust stdlib I prefer something more general, an array chunks for iterator (that perhaps works only on Copy types?):

Iterator::array_chunks_copy::()

It's similar to slice::array_chunks but I think it should return actual arrays instead of array references.

Beside this functions I'd like a rustc (or Clippy) lint that warns against returning large chunks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions