Commit 58763d7
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: #42223
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent a4aa9eb commit 58763d7
3 files changed
+11
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
711 | 712 | | |
712 | 713 | | |
713 | 714 | | |
714 | | - | |
| 715 | + | |
715 | 716 | | |
716 | 717 | | |
717 | 718 | | |
| |||
738 | 739 | | |
739 | 740 | | |
740 | 741 | | |
741 | | - | |
| 742 | + | |
742 | 743 | | |
743 | 744 | | |
744 | 745 | | |
| |||
753 | 754 | | |
754 | 755 | | |
755 | 756 | | |
756 | | - | |
| 757 | + | |
757 | 758 | | |
758 | 759 | | |
759 | 760 | | |
| |||
774 | 775 | | |
775 | 776 | | |
776 | 777 | | |
777 | | - | |
| 778 | + | |
778 | 779 | | |
779 | 780 | | |
780 | 781 | | |
781 | 782 | | |
782 | 783 | | |
783 | 784 | | |
784 | | - | |
| 785 | + | |
785 | 786 | | |
786 | 787 | | |
787 | 788 | | |
| |||
791 | 792 | | |
792 | 793 | | |
793 | 794 | | |
794 | | - | |
| 795 | + | |
795 | 796 | | |
796 | 797 | | |
797 | | - | |
| 798 | + | |
798 | 799 | | |
799 | 800 | | |
800 | 801 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | | - | |
| 500 | + | |
| 501 | + | |
501 | 502 | | |
502 | 503 | | |
503 | 504 | | |
| |||
0 commit comments