FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

stream: remove always-false condition check by Trott · Pull Request #41488 · nodejs/node · GitHub

/ node Public

stream: remove always-false condition check - #41488

Merged
nodejs-github-bot merged 1 commit into
nodejs:masterfrom
Trott:guaranteed
Jan 15, 2022
Merged

stream: remove always-false condition check#41488
nodejs-github-bot merged 1 commit into
nodejs:masterfrom
Trott:guaranteed

Conversation

Trott commented Jan 12, 2022

Copy link
Copy Markdown
Member

Remove comparison to null of variable guaranteed to be a boolean.

Remove comparison to null of variable guaranteed to be a boolean.

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams

nodejs-github-bot added the needs-ci PRs that need a full CI run. label Jan 12, 2022
Trott added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 12, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 12, 2022

Copy link
Copy Markdown
Collaborator

mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm

Trott added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Jan 12, 2022
@@ -119,14 +119,14 @@ function isReadableFinished(stream, strict) {
function isReadable(stream) {
if (stream && stream[kIsReadable] != null) return stream[kIsReadable];
const r = isReadableNodeStream(stream);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

r value is unused if typeof stream?.readable is not a boolean, it would be worth move its assignment below. (Same in isWritable)

Trott added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jan 14, 2022
nodejs-github-bot added the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Jan 14, 2022

This comment has been minimized.

Trott removed the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Jan 14, 2022
VoltrexKeyva removed the needs-ci PRs that need a full CI run. label Jan 14, 2022
Trott added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 14, 2022
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 15, 2022
nodejs-github-bot merged commit f7be6ab into nodejs:master Jan 15, 2022

Copy link
Copy Markdown
Collaborator

Landed in f7be6ab

Trott deleted the guaranteed branch January 15, 2022 00:27
Trott added a commit to Trott/io.js that referenced this pull request Jan 15, 2022
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: nodejs#41488 (review)
targos pushed a commit that referenced this pull request Jan 16, 2022
Remove comparison to null of variable guaranteed to be a boolean.

PR-URL: #41488
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
nodejs-github-bot pushed a commit that referenced this pull request Jan 17, 2022
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>
BethGriggs pushed a commit that referenced this pull request Jan 25, 2022
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>
danielleadams pushed a commit that referenced this pull request Feb 1, 2022
Remove comparison to null of variable guaranteed to be a boolean.

PR-URL: #41488
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
danielleadams mentioned this pull request Feb 1, 2022
danielleadams pushed a commit that referenced this pull request Feb 26, 2022
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL