Tiny cleanup

This commit is contained in:
mlemanczyk committed 2023-06-25 21:01:41 +02:00
1 parent 413d625d8e
commit 6362c343db
1 file changed
+1 -2
+1 -2
View File
@@ -520,7 +520,7 @@ namespace Recyclable.Collections
} }
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public Enumerator GetEnumerator() => new Enumerator(this); public Enumerator GetEnumerator() => new(this);
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
IEnumerator IEnumerable.GetEnumerator() => new Enumerator(this); IEnumerator IEnumerable.GetEnumerator() => new Enumerator(this);
@@ -533,7 +533,6 @@ namespace Recyclable.Collections
if (_capacity > 0) if (_capacity > 0)
{ {
Clear(); Clear();
_capacity = 0;
if (_count is >= RecyclableDefaults.MinPooledArrayLength) if (_count is >= RecyclableDefaults.MinPooledArrayLength)
{ {
_arrayPool.Return(_memoryBlock, NeedsClearing); _arrayPool.Return(_memoryBlock, NeedsClearing);