lib: remove some useless assignments

PR-URL: https://github.com/nodejs/node/pull/23199
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Gus Caplan 2018-09-25 15:41:55 -05:00 committed by Rich Trott
parent ef0c178c35
commit 366aaf57fa
3 changed files with 2 additions and 6 deletions

View File

@ -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') {

View File

@ -258,7 +258,7 @@ function* emitKeys(stream) {
s += (ch = yield);
if (ch >= '0' && ch <= '9') {
s += (ch = yield);
s += yield;
}
}

View File

@ -1055,10 +1055,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);