Open jam1garner opened 3 years ago
Unlike the count attribute, which is limited to supporting Vec<T>, the count helper function works for any type which implements FromIterator<T>.
Vec<T>
FromIterator<T>
Upsides:
Possible pitfalls:
Vec<u8>
FWIW, if there's a measurable perf regression, this sounds exactly like the kind of use-cases where autoref specialization could be used to recover the lost perf.
Unlike the count attribute, which is limited to supporting
Vec<T>
, the count helper function works for any type which implementsFromIterator<T>
.Upsides:
Possible pitfalls:
Vec<u8>