fs: remove needless assignment of null
This line `pool = null;` isn't needed and has been around since the first iteration of streams. I can't find a good reason for it to exist, it's not more readable, nor does it seem to trick the compiler into any optimizations. PR-URL: https://github.com/nodejs/node/pull/10260 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
This commit is contained in:
parent
15c71f6c66
commit
1081f0f33d
@ -1791,7 +1791,6 @@ ReadStream.prototype._read = function(n) {
|
|||||||
|
|
||||||
if (!pool || pool.length - pool.used < kMinPoolSpace) {
|
if (!pool || pool.length - pool.used < kMinPoolSpace) {
|
||||||
// discard the old pool.
|
// discard the old pool.
|
||||||
pool = null;
|
|
||||||
allocNewPool(this._readableState.highWaterMark);
|
allocNewPool(this._readableState.highWaterMark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user