refactor: remove uneeded .entries() on map iteration
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 16 Apr 2023 10:34:14 +0000 (12:34 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 16 Apr 2023 10:34:14 +0000 (12:34 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/selection-strategies/fair-share-worker-choice-strategy.ts

index 4d6ef2a828fc2b21cd2356886118649e5baacd4f..f72ffb566c94345497267e1d9801e36b51f000af 100644 (file)
@@ -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)
       }