Fixing condition for taking array from the pool

This commit is contained in:
mlemanczyk committed 2023-01-28 15:02:50 +01:00
1 parent 3ce5c52d54
commit 315acb5a68
1 file changed
+1 -1
+1 -1
View File
@@ -84,7 +84,7 @@ namespace Recyclable.Collections
int requiredBlockCount = (int)(newCapacity / blockSize) + (newCapacity % blockSize > 0 ? 1 : 0);
Span<T[]> newArraySpan;
T[][] newMemoryBlocks = requiredBlockCount > RecyclableDefaults.MinPooledArrayLength
T[][] newMemoryBlocks = requiredBlockCount >= RecyclableDefaults.MinPooledArrayLength
? arrayPool.Rent(requiredBlockCount)
: new T[requiredBlockCount][];