From e7c95ce226ffd926667fb3869809f8bbaa20185e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 16 Apr 2023 12:34:14 +0200 Subject: [PATCH] refactor: remove uneeded .entries() on map iteration MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../selection-strategies/fair-share-worker-choice-strategy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts b/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts index 4d6ef2a8..f72ffb56 100644 --- a/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts @@ -82,7 +82,7 @@ export class FairShareWorkerChoiceStrategy< /** @inheritDoc */ public remove (workerNodeKey: number): boolean { const deleted = this.workerLastVirtualTaskTimestamp.delete(workerNodeKey) - for (const [key, value] of this.workerLastVirtualTaskTimestamp.entries()) { + for (const [key, value] of this.workerLastVirtualTaskTimestamp) { if (key > workerNodeKey) { this.workerLastVirtualTaskTimestamp.set(key - 1, value) } -- 2.34.1