From 848374972c79d8ed8007ff0ef83274202cca7e72 Mon Sep 17 00:00:00 2001 From: just Date: Sun, 12 Jul 2026 18:33:05 +0400 Subject: [PATCH] fixed error to typed result conversion --- Railway/Result.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Railway/Result.cs b/Railway/Result.cs index cbaff5c..6db74e5 100644 --- a/Railway/Result.cs +++ b/Railway/Result.cs @@ -167,7 +167,7 @@ public readonly struct Result : IEquatable> public static implicit operator Result(Error error) => new(error); [Pure, MethodImpl(MethodImplOptions.AggressiveInlining)] public static implicit operator Result(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 value) => new(value); [Pure] public bool IsSuccess => State == ResultState.Success;