Skip to content

Commit d5d8670

Browse files
devsnekBethGriggs
authored andcommitted
lib: remove some useless assignments
PR-URL: #23199 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent f2df92c commit d5d8670

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

‎lib/events.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ function _addListener(target, type, listener, prepend) {
224224

225225
if(existing===undefined){
226226
// Optimize the case of one listener. Don't need the extra array object.
227-
existing=events[type]=listener;
227+
events[type]=listener;
228228
++target._eventsCount;
229229
}else{
230230
if(typeofexisting==='function'){

‎lib/internal/readline.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ function* emitKeys(stream) {
258258
s+=(ch=yield);
259259

260260
if(ch>='0'&&ch<='9'){
261-
s+=(ch=yield);
261+
s+=yield;
262262
}
263263
}
264264

‎lib/net.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,10 +1071,6 @@ function afterConnect(status, handle, req, readable, writable) {
10711071
return;
10721072
}
10731073

1074-
// Update handle if it was wrapped
1075-
// TODO(indutny): assert that the handle is actually an ancestor of old one
1076-
handle=self._handle;
1077-
10781074
debug('afterConnect');
10791075

10801076
assert(self.connecting);

0 commit comments

Comments
 (0)