jtmueller / Collections.Pooled

Fast, low-allocation ports of List, Dictionary, HashSet, Stack, and Queue using ArrayPool and Span.
MIT License
547 stars 48 forks source link

Add a Span-based constructor overload to PooledStack #16

Closed jtmueller closed 5 years ago

jtmueller commented 5 years ago

Is your feature request related to a problem? Please describe.

If foo is PooledList<int>... new PooledStack<int>(foo.Span) ...does not work without an explicit cast.

Describe the solution you'd like It would be nice to not have to cast. There may be other pooled collections to which this applies.

jtmueller commented 5 years ago

Bitten again by F#'s lack of support for implicit casts. This is not needed.