From a9012dc25db5bff02cf8f82c8768df837a6c45bb Mon Sep 17 00:00:00 2001 From: mlemanczyk Date: Sun, 29 Jan 2023 14:09:41 +0100 Subject: [PATCH] Tiny cleanup. Declaration moved closer to usage. --- Recyclable.Collections/RecyclableList.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Recyclable.Collections/RecyclableList.cs b/Recyclable.Collections/RecyclableList.cs index c81d400..adf7a6d 100644 --- a/Recyclable.Collections/RecyclableList.cs +++ b/Recyclable.Collections/RecyclableList.cs @@ -79,7 +79,6 @@ namespace Recyclable.Collections protected static T[][] SetNewLength(in T[][]? source, int blockSize, in long newCapacity) { ArrayPool arrayPool = _arrayPool; - ArrayPool blockArrayPool = _blockArrayPool; var sourceBlockCount = source?.Length ?? 0; int requiredBlockCount = (int)(newCapacity / blockSize) + (newCapacity % blockSize > 0 ? 1 : 0); @@ -100,6 +99,7 @@ namespace Recyclable.Collections newArraySpan = newArraySpan[sourceBlockCount..]; } + ArrayPool blockArrayPool = _blockArrayPool; int uninitializedBlocksCount = newArraySpan.Length; if (uninitializedBlocksCount == requiredBlockCount) {