Skip to content

Commit 6bf399a

Browse files
committed
Remove unwrapper
1 parent 73a6982 commit 6bf399a

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/FSharpPlus/Extensions/Task.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,7 @@ module Task =
340340
| Canceled -> canceled
341341
else
342342
task.ContinueWith(fun (x: Task<'T>) -> tryWith (fun () -> x) compensation).Unwrap ()
343-
| Error (:? AggregateException as exn) -> compensation (unwrapException exn)
344-
| Error exn -> compensation exn
343+
| Error exn -> compensation exn
345344

346345
[<ObsoleteAttribute("Swap parameters")>]
347346
let rec tryFinally (body: unit -> Task<'T>) (compensation : unit -> unit) : Task<'T> =

src/FSharpPlus/Extensions/ValueTask.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,7 @@ module ValueTask =
314314
| Canceled -> canceled
315315
else
316316
task.AsTask().ContinueWith(fun (x: Task<'T>) -> Task.tryWith (compensation >> fun x -> x.AsTask()) (fun () -> x)).Unwrap () |> ValueTask<'T>
317-
| Error (:? AggregateException as exn) -> compensation (unwrapException exn)
318-
| Error exn -> compensation exn
317+
| Error exn -> compensation exn
319318

320319

321320
/// Used to de-sugar try .. finally .. blocks in Computation Expressions.

0 commit comments

Comments
 (0)