refactor: forEach -> for ... of on collections
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 12 May 2023 20:41:51 +0000 (22:41 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 12 May 2023 20:41:51 +0000 (22:41 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/selection-strategies/worker-choice-strategy-context.ts

index 5d26f82ba4f5784873c18eb037beed9b26a5e2f5..e07808bcefe837ef5289be98db46ac3664607219 100644 (file)
@@ -165,8 +165,8 @@ export class WorkerChoiceStrategyContext<
    * @param opts - The worker choice strategy options.
    */
   public setOptions (opts: WorkerChoiceStrategyOptions): void {
-    this.workerChoiceStrategies.forEach(workerChoiceStrategy => {
+    for (const workerChoiceStrategy of this.workerChoiceStrategies.values()) {
       workerChoiceStrategy.setOptions(opts)
-    })
+    }
   }
 }