Skip to content
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

Missing Match for UnitResult #483

Open
thomaseyde opened this issue Jan 9, 2023 · 1 comment
Open

Missing Match for UnitResult #483

thomaseyde opened this issue Jan 9, 2023 · 1 comment

Comments

@thomaseyde
Copy link

I miss the following Match method for UnitResult:

static class MatchUnitResult
{
    public static R Match<E, R>(this UnitResult<E> result, Func<R> success, Func<E, R> failure) =>
        result.IsSuccess
            ? success()
            : failure(result.Error);
}
@vkhorikov
Copy link
Owner

Thanks for reporting this. Feel free to submit a PR as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants