From 06ef3d4fa4d33277de7cc128a52d87c7f13da60f Mon Sep 17 00:00:00 2001 From: mlemanczyk Date: Sat, 28 Jan 2023 23:19:26 +0100 Subject: [PATCH] Tiny cleanup --- Recyclable.Collections/RecyclableList.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Recyclable.Collections/RecyclableList.cs b/Recyclable.Collections/RecyclableList.cs index eb7a97c..9d732ee 100644 --- a/Recyclable.Collections/RecyclableList.cs +++ b/Recyclable.Collections/RecyclableList.cs @@ -83,8 +83,7 @@ namespace Recyclable.Collections var sourceBlockCount = source?.Length ?? 0; int requiredBlockCount = (int)(newCapacity / blockSize) + (newCapacity % blockSize > 0 ? 1 : 0); - Span sourceSpan; - Span newArraySpan; + Span sourceSpan, newArraySpan; T[][] newMemoryBlocks = requiredBlockCount >= RecyclableDefaults.MinPooledArrayLength ? arrayPool.Rent(requiredBlockCount) : new T[requiredBlockCount][];