namespace MemoryPools.Collections.Linq { public static partial class PoolingEnumerable { /// /// Casts all elements to the given type. Complexity = O(N) /// public static IPoolingEnumerable Cast(this IPoolingEnumerable source) { if (source is IPoolingEnumerable res) return res; return Pool>.Get().Init(source); } } }