From cf0c86d353e958748e9b617a221ba0066a070455 Mon Sep 17 00:00:00 2001 From: mlemanczyk Date: Sun, 21 May 2023 20:19:56 +0200 Subject: [PATCH] Tiny cleanup --- Recyclable.Collections/RecyclableArrayList.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Recyclable.Collections/RecyclableArrayList.cs b/Recyclable.Collections/RecyclableArrayList.cs index e1a841c..f86ff18 100644 --- a/Recyclable.Collections/RecyclableArrayList.cs +++ b/Recyclable.Collections/RecyclableArrayList.cs @@ -4,9 +4,8 @@ using System.Runtime.CompilerServices; namespace Recyclable.Collections { - public class RecyclableArrayList : IEnumerable, IList, IDisposable + public class RecyclableArrayList : IList, IDisposable { - private const int ItemNotFound = -1; private static readonly ArrayPool _arrayPool = ArrayPool.Create(); protected static readonly bool NeedsClearing = !typeof(T).IsValueType; @@ -405,7 +404,7 @@ namespace Recyclable.Collections } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public int IndexOf(T itemToFind) => _count > 0 ? Array.IndexOf(_memoryBlock, itemToFind, 0, _count) : ItemNotFound; + public int IndexOf(T itemToFind) => _count > 0 ? Array.IndexOf(_memoryBlock, itemToFind, 0, _count) : RecyclableDefaults.ItemNotFoundIndex; [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] public void Insert(int index, T item)