Skip to content

Commit

Permalink
stream: remove redundant context from comments
Browse files Browse the repository at this point in the history
Using the variable name in the comment and justifying the type seems
redundant to me and instead it should defined the entity which it is
acting, like in our case it is acting as a flag to control the flow in
streams.

PR-URL: #35728
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
  • Loading branch information
yashLadha authored and BethGriggs committed Dec 15, 2020
1 parent 41aac46 commit d1fd3f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/streams/from.js
Expand Up @@ -38,11 +38,11 @@ function from(Readable, iterable, opts) {
...opts
});

// Reading boolean to protect against _read
// Flag to protect against _read
// being called before last iteration completion.
let reading = false;

// needToClose boolean if iterator needs to be explicitly closed
// Flag for when iterator needs to be explicitly closed.
let needToClose = false;

readable._read = function() {
Expand Down

0 comments on commit d1fd3f2

Please sign in to comment.