forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src,crypto: avoid tristate Maybe<bool> in ExportJWKEcKey()
The function currently uses the return value to convey whether an exception was thrown while it was running by using either Just(true) or Nothing<bool>(). Unfortunately, Maybe<bool> also has a third state - Just(false), which doesn't make any sense here. So this change avoids the possibility of a tristate return value by making use of Maybe<void> which only has two valid states - JustVoid() / Nothing<void>(), which fits right in. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs#42223 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
- Loading branch information
Showing
3 changed files
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters