Tiny cleanup

This commit is contained in:
mlemanczyk committed 2023-04-30 22:13:21 +02:00
1 parent 85c92ee17d
commit 2d55e537d0
1 file changed
+5 -4
+5 -4
View File
@@ -980,10 +980,11 @@ namespace Recyclable.Collections
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public int IndexOf(T item) => _longCount == 0
? ItemNotFoundIndex
: _longCount <= _blockSize
? Array.IndexOf(_memoryBlocks[0], item, 0, checked((int)_longCount))
: checked((int)DoIndexOfParallel(item));
? ItemNotFoundIndex
//// Optimization for tiny collections to avoid any vars etc.
: _longCount <= _blockSize
? Array.IndexOf(_memoryBlocks[0], item, 0, checked((int)_longCount))
: checked((int)DoIndexOfParallel(item));
public void Insert(int index, T item) => throw new NotSupportedException();