buffer: increase coverage by removing dead code#15100
Conversation
|
This seems to have a whole lot more in it that it needs to. Can I ask that you rework it a bit to limit it to just the one change? |
68a139d to
18967f4
Compare
|
At @decareano's request I cleaned it up. Hello @decareano, and welcome. Thank you for the contribution 😉 |
buffer.js:L196 `if (value == null)` guarantees `obj != null` so L406+L418 are unnecessary. PR-URL: nodejs#15100 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
18967f4 to
08984b2
Compare
|
@decareano congratulations on landing your first code contribution. GitHub has promoted you from: |
|
tanks to @decareano |
buffer.js:L196 `if (value == null)` guarantees `obj != null` so L406+L418 are unnecessary. PR-URL: nodejs/node#15100 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
buffer.js:L196 `if (value == null)` guarantees `obj != null` so L406+L418 are unnecessary. PR-URL: #15100 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
buffer.js:L196 `if (value == null)` guarantees `obj != null` so L406+L418 are unnecessary. PR-URL: #15100 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
|
Should this be backported to |




Buffer.js file. L196
if (value == null)guaranteesobj != nullso L406 is unnecessary.Removing outer if statement L406 and L418.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes