Skip to content

Conversation

@Trott
Copy link
Member

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

Remove comparison to null of variable guaranteed to be a boolean.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Jan 12, 2022
@TrottTrott added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 12, 2022
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 12, 2022
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollinamcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@TrottTrott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 12, 2022

functionisReadable(stream){
if(stream&&stream[kIsReadable]!=null)returnstream[kIsReadable];
constr=isReadableNodeStream(stream);
Copy link
Contributor

Choose a reason for hiding this comment

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

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

@TrottTrott 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-botnodejs-github-bot added the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Jan 14, 2022
@nodejs-github-bot

This comment has been minimized.

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

Landed in f7be6ab

@TrottTrott 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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
@targostargos mentioned this pull request Jan 16, 2022
mawaregetsuka pushed a commit to mawaregetsuka/node that referenced this pull request Jan 17, 2022
Remove comparison to null of variable guaranteed to be a boolean. PR-URL: nodejs#41488 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
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 <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
thedull pushed a commit to thedull/node that referenced this pull request Jan 18, 2022
Remove comparison to null of variable guaranteed to be a boolean. PR-URL: nodejs#41488 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
thedull pushed a commit to thedull/node that referenced this pull request Jan 18, 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) PR-URL: nodejs#41534 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
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 <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Linkgoron pushed a commit to Linkgoron/node that referenced this pull request Jan 31, 2022
Remove comparison to null of variable guaranteed to be a boolean. PR-URL: nodejs#41488 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
Linkgoron pushed a commit to Linkgoron/node that referenced this pull request Jan 31, 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) PR-URL: nodejs#41534 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
@danielleadamsdanielleadams 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 <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@Trott@nodejs-github-bot@mcollina@benjamingr@ronag@tniessen@aduh95@RaisinTen@VoltrexKeyva