Skip to content

Commit

Permalink
lib: remove some useless assignments
Browse files Browse the repository at this point in the history
PR-URL: #23199
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
devsnek authored and BethGriggs committed Feb 12, 2019
1 parent f2df92c commit d5d8670
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,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 @@ -1071,10 +1071,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
handle = self._handle;

debug('afterConnect');

assert(self.connecting);
Expand Down

0 comments on commit d5d8670

Please sign in to comment.