From: Jérôme Benoit Date: Fri, 12 May 2023 20:41:51 +0000 (+0200) Subject: refactor: forEach -> for ... of on collections X-Git-Tag: v2.5.0~41 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=0509fd43c1e920aed11ba50293062eaf167bef44;p=poolifier.git refactor: forEach -> for ... of on collections Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/selection-strategies/worker-choice-strategy-context.ts b/src/pools/selection-strategies/worker-choice-strategy-context.ts index 5d26f82b..e07808bc 100644 --- a/src/pools/selection-strategies/worker-choice-strategy-context.ts +++ b/src/pools/selection-strategies/worker-choice-strategy-context.ts @@ -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) - }) + } } }