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.
It would be useful to have HomogeneousTuple / TupleCollect for N larger than 4.
E.g. I often use it with
splitnto avoid allocations, like:instead of
And often my N is higher than 4.