Skip to content

[ER] Iterator::array_chunks_copy ? #94257

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
leonardo-m opened this issue Feb 22, 2022 · 2 comments
Closed

[ER] Iterator::array_chunks_copy ? #94257

leonardo-m opened this issue Feb 22, 2022 · 2 comments

Comments

@leonardo-m
Copy link

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.

@SkiFire13
Copy link
Contributor

Have you seen #92393 and #93700?

@leonardo-m
Copy link
Author

Have you seen #92393 and #93700?

Thank you, I didn't, I close this issue down as dupe.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants