File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
FsToolkit.ErrorHandling.TaskResult Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ module TaskResultCEExtensions =
150150 /// <summary>
151151 /// Method lets us transform data types into our internal representation.
152152 /// </summary>
153- member inline __.Source ( asyncComputation : Async < _ >) : Task < Result < _ , _ >> = asyncComputation |> TaskResult.ofAsync
153+ member inline __.Source ( asyncComputation : Async < _ >) : Task < Result < _ , _ >> = asyncComputation |> Async.StartAsTask |> Task.map Ok
154154
155155 /// <summary>
156156 /// Method lets us transform data types into our internal representation.
Original file line number Diff line number Diff line change @@ -125,10 +125,10 @@ module AsyncResultCEExtensions =
125125 /// <summary>
126126 /// Method lets us transform data types into our internal representation.
127127 /// </summary>
128- member inline _.Source ( task : Task < _ >) : Async < Result < _ , _ >> = task |> AsyncResult.ofTask
128+ member inline _.Source ( task : Task < _ >) : Async < Result < _ , _ >> = task |> Async.AwaitTask |> Async.map Ok
129129
130130 /// <summary>
131131 /// Method lets us transform data types into our internal representation.
132132 /// </summary>
133- member inline _.Source ( task : Task ) : Async < Result < _ , _ >> = task |> AsyncResult.ofTaskAction
133+ member inline _.Source ( task : Task ) : Async < Result < _ , _ >> = task |> Async.AwaitTask |> Async.map Ok
134134#endif
You can’t perform that action at this time.
0 commit comments