Skip to content

HomogeneousTuple / TupleCollect for N > 4 ? #428

Closed
@Boscop

Description

@Boscop

It would be useful to have HomogeneousTuple / TupleCollect for N larger than 4.
E.g. I often use it with splitn to avoid allocations, like:

s.splitn(N, pattern).collect_tuple()

instead of

if let [/* ... */] = pattern.splitn(N, pattern).collect_vec().as_slice() {
	Some(/* ... */)
} else {
	None
}

And often my N is higher than 4.

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