stream: avoid function call where possible · nodejs/node@1425e75 · GitHub
Skip to content

Commit 1425e75

Browse files
Trottdanielleadams
authored andcommitted
stream: avoid function call where possible
Instead of assigning a boolean, move the function call that assigns a value to the boolean to the only place that boolean is checked. This avoids the function call in cases where it is not needed. Refs: #41488 (review) PR-URL: #41534 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent ec72cb4 commit 1425e75

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lib/internal/streams/utils.js

Lines changed: 6 additions & 4 deletions

0 commit comments

Comments
 (0)