Closed
Description
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
Labels
No labels