test action

This commit is contained in:
2026-04-05 00:35:23 -04:00
parent e9ab803d54
commit 029d9e6296

View File

@@ -62,7 +62,7 @@ public static class OptionExtensions
{
return isSuccess(value) ? new Right<L, R>(ok()) : new Left<L, R>(err(value));
}
public static IEither<L, R> ToEither<Tvalue, L, R>(this Tvalue value, Tvalue successValue, Func<R> ok, Func<Tvalue, L> err)
public static IEither<L, R> ToEither<Tvalue, L, R>(this Tvalue value, Tvalue successValue, Func<R> ok, Func<Tvalue, L> err) where Tvalue : notnull
{
return value.ToEither(e => e.Equals(successValue), ok, err);
}