-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if CI is green
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 != null
so L406 is unnecessary.Removing outer if statement L406 and L418.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes