repositories
/
poolifier.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3032893
)
refactor: remove unneeded intermediate variable
author
Jérôme Benoit
<jerome.benoit@sap.com>
Sun, 2 Apr 2023 15:52:35 +0000
(17:52 +0200)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Sun, 2 Apr 2023 15:52:35 +0000
(17:52 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/pools/abstract-pool.ts
b/src/pools/abstract-pool.ts
index 2c4559a34dd1f5079f7ce7d0e8efaf70b979372e..947db17c8480ea97de0591c280042081c0ba4935 100644
(file)
--- 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<Worker>
- return workerEntry.tasksUsage
+ return (this.workers.get(workerKey) as WorkerType<Worker>).tasksUsage
}
throw new Error('Worker could not be found in the pool')
}