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:
parent
ef0c178c35
commit
366aaf57fa
@ -224,7 +224,7 @@ function _addListener(target, type, listener, prepend) {
|
|||||||
|
|
||||||
if (existing === undefined) {
|
if (existing === undefined) {
|
||||||
// Optimize the case of one listener. Don't need the extra array object.
|
// Optimize the case of one listener. Don't need the extra array object.
|
||||||
existing = events[type] = listener;
|
events[type] = listener;
|
||||||
++target._eventsCount;
|
++target._eventsCount;
|
||||||
} else {
|
} else {
|
||||||
if (typeof existing === 'function') {
|
if (typeof existing === 'function') {
|
||||||
|
@ -258,7 +258,7 @@ function* emitKeys(stream) {
|
|||||||
s += (ch = yield);
|
s += (ch = yield);
|
||||||
|
|
||||||
if (ch >= '0' && ch <= '9') {
|
if (ch >= '0' && ch <= '9') {
|
||||||
s += (ch = yield);
|
s += yield;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1055,10 +1055,6 @@ function afterConnect(status, handle, req, readable, writable) {
|
|||||||
return;
|
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');
|
debug('afterConnect');
|
||||||
|
|
||||||
assert(self.connecting);
|
assert(self.connecting);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user