Skip to content

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

Merge request reports

Loading