From b7c84bbf50f0263f8054494b74430e3115c9ea58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 2 Apr 2023 17:52:35 +0200 Subject: [PATCH] refactor: remove unneeded intermediate variable MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/abstract-pool.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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') } -- 2.34.1