src,crypto: avoid tristate `Maybe<bool>` in `ExportJWKEcKey()`
requested to merge github/fork/RaisinTen/src,crypto/avoid-tristate-Maybe-bool-in-ExportJWKEcKey into master
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