-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
fs: use isUint32 in isFd #20330
fs: use isUint32 in isFd #20330
Conversation
This commit updates the isFd function to call isUint32 instead of doing the same thing. I was tempted to remove isFd and just use isUint32 instead but wanted to get some feedback from others regarding readablity.
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.
Should we not replace isFd
with isUint32
in this case?
Yeah, I was thinking the same thing (mentioned in the commit message). I'd prefer that. I'll wait a little and if no one objects I'll update. |
If you'd like to still call |
I'd like to just use isUint32, but I like what you suggested there if others disagree. Thanks! |
I'm +1 on what @tniessen suggested - they do the same thing - but I like the fact |
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.
And in either case LGTM on the current code.
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 either way.
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.
I’m not a fan of exposing internal functions to userland. The PR in its current shape LGTM.
@TimothyGu that function is only used internally as far as I can tell. |
Ah oops. In that case LGTM either way. |
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.
I prefer to keep isFd
as it more clearly indicates the intent (as opposed to implementation).
Landed in bdf0d9b 🎉 |
This commit updates the isFd function to call isUint32 instead of doing the same thing. PR-URL: nodejs#20330 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
This commit updates the isFd function to call isUint32 instead of doing the same thing. PR-URL: #20330 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
This commit updates the isFd function to call isUint32 instead of
doing the same thing. I was tempted to remove isFd and just use isUint32
instead but wanted to get some feedback from others regarding
readablity.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes