From: Jérôme Benoit Date: Sun, 16 Apr 2023 10:34:14 +0000 (+0200) Subject: refactor: remove uneeded .entries() on map iteration X-Git-Tag: v2.4.11~44 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e7c95ce226ffd926667fb3869809f8bbaa20185e;p=poolifier.git refactor: remove uneeded .entries() on map iteration Signed-off-by: Jérôme Benoit --- 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) }