Skip to content

Commit 1081f0f

Browse files
reconbotitaloacasas
authored andcommitted
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: #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>
1 parent 15c71f6 commit 1081f0f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/fs.js

-1
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,6 @@ ReadStream.prototype._read = function(n) {
17911791

17921792
if (!pool || pool.length - pool.used < kMinPoolSpace) {
17931793
// discard the old pool.
1794-
pool = null;
17951794
allocNewPool(this._readableState.highWaterMark);
17961795
}
17971796

0 commit comments

Comments
 (0)