Skip to content

chunks_exact variant with const generic argument #60735

Closed
@leonardo-m

Description

@leonardo-m

In the stdlib I'd like an iterator like chunks_exact that yields fixed-sized arrays, using a const usize argument (mostly useful for short arrays).

.chunks_exact_ct::<3>()
.map(|[a, b, c]| a + b + c)

Those arrays could allow better optimizations and also better pattern matching.

This issue has been assigned to @DutchGhost via this comment.

Metadata

Metadata

Assignees

Labels

A-const-genericsArea: const generics (parameters and arguments)A-iteratorsArea: IteratorsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions