Removed unnecessary Span<T> creation in RecyclableList.AddRange(T[] items) & .AddRange(RecyclableArrayList<T> items)

This commit is contained in:
Marek Lemańczyk committed 2023-03-11 16:43:14 +01:00
1 parent 1d61684300
commit 8dfdc6f088
1 file changed
+2 -2
+2 -2
View File
@@ -294,7 +294,7 @@ namespace Recyclable.Collections
}
_nextItemIndex = itemsSpan.Length;
itemsSpan[..itemsSpan.Length].CopyTo(targetBlockArraySpan);
itemsSpan.CopyTo(targetBlockArraySpan);
_longCount = targetCapacity;
_lastBlockIndex = targetBlockIndex;
}
@@ -320,7 +320,7 @@ namespace Recyclable.Collections
}
_nextItemIndex = itemsSpan.Length;
itemsSpan[..itemsSpan.Length].CopyTo(targetBlockArraySpan);
itemsSpan.CopyTo(targetBlockArraySpan);
_longCount = targetCapacity;
_lastBlockIndex = targetBlockIndex;
}