Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit 5ca29ad

Browse files
committed
pool.ts: readability improvement as suggested in code review
1 parent 595beea commit 5ca29ad

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

dev/src/pool.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,9 @@ class LazyLogStringForAllClientIds<T extends object> {
380380
}
381381

382382
private logStringFromClientIds(clients: Iterable<T>): string {
383-
const clientIds: string[] = [];
384-
for (const client of clients) {
385-
clientIds.push(this.clientIdByClient.get(client) ?? '<unknown>');
386-
}
387-
return clientIds.sort().join(', ');
383+
return Array.from(clients)
384+
.map(client => this.clientIdByClient.get(client) ?? '<unknown>')
385+
.sort()
386+
.join(', ');
388387
}
389388
}

0 commit comments

Comments
 (0)