Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: remove some useless assignments #23199

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function _addListener(target, type, listener, prepend) {

if (existing === undefined) {
// Optimize the case of one listener. Don't need the extra array object.
existing = events[type] = listener;
events[type] = listener;
++target._eventsCount;
} else {
if (typeof existing === 'function') {
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ function* emitKeys(stream) {
s += (ch = yield);

if (ch >= '0' && ch <= '9') {
s += (ch = yield);
s += yield;
}
}

Expand Down
4 changes: 0 additions & 4 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -1081,10 +1081,6 @@ function afterConnect(status, handle, req, readable, writable) {
return;
}

// Update handle if it was wrapped
// TODO(indutny): assert that the handle is actually an ancestor of old one
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this TODO be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

that's why I pinged @indutny

Copy link
Member

Choose a reason for hiding this comment

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

I'm afraid I no longer remember what this was about. This comments is years old.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps this particular change alone can be done in a separate PR then?

handle = self._handle;

debug('afterConnect');

assert(self.connecting);
Expand Down