fixed error to typed result conversion
.NET Test / .NET tests (push) Successful in 1m59s

This commit is contained in:
2026-07-12 18:33:05 +04:00
parent 9c1c32c1ee
commit 848374972c
+1 -1
View File
@@ -167,7 +167,7 @@ public readonly struct Result<T> : IEquatable<Result<T>>
public static implicit operator Result<T>(Error error) => new(error);
[Pure, MethodImpl(MethodImplOptions.AggressiveInlining)]
public static implicit operator Result<T>(Exception exception) => new(
new ExceptionalError(exception ?? throw new ArgumentNullException(nameof(exception))));
Error.New(exception ?? throw new ArgumentNullException(nameof(exception))));
[Pure, MethodImpl(MethodImplOptions.AggressiveInlining)]
public static implicit operator Result<T>(T value) => new(value);
[Pure] public bool IsSuccess => State == ResultState.Success;