From: Jérôme Benoit Date: Sun, 2 Apr 2023 15:52:35 +0000 (+0200) Subject: refactor: remove unneeded intermediate variable X-Git-Tag: v2.4.0-0~15 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=b7c84bbf50f0263f8054494b74430e3115c9ea58;p=poolifier.git refactor: remove unneeded intermediate variable Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 2c4559a3..947db17c 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -411,8 +411,7 @@ export abstract class AbstractPool< public getWorkerTasksUsage (worker: Worker): TasksUsage | undefined { const workerKey = this.getWorkerKey(worker) if (workerKey !== undefined) { - const workerEntry = this.workers.get(workerKey) as WorkerType - return workerEntry.tasksUsage + return (this.workers.get(workerKey) as WorkerType).tasksUsage } throw new Error('Worker could not be found in the pool') }