Skip to content

Commit 25fb57f

Browse files
committed
Rename (Value)Task.recover to recoverWith
1 parent bc1c717 commit 25fb57f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/FSharpPlus/Extensions/Task.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ module Task =
424424
/// <param name="source">The source task.</param>
425425
/// <returns>A successful resulting task.</returns>
426426
/// <remarks>The result is always a successful task, unless the mapping function itself throws an exception.</remarks>
427-
let inline recover ([<InlineIfLambda>]mapper: exn -> 'T) (source: Task<'T>) : Task<'T> =
427+
let inline recoverWith ([<InlineIfLambda>]mapper: exn -> 'T) (source: Task<'T>) : Task<'T> =
428428
let source = nullArgCheck (nameof source) source
429429

430430
tryWith (fun () -> source) (mapper >> result)

src/FSharpPlus/Extensions/ValueTask.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ module ValueTask =
390390
/// <param name="source">The source task.</param>
391391
/// <returns>A successful resulting task.</returns>
392392
/// <remarks>The result is always a successful task, unless the mapping function itself throws an exception.</remarks>
393-
let inline recover ([<InlineIfLambda>]mapper: exn -> 'T) (source: ValueTask<'T>) : ValueTask<'T> =
393+
let inline recoverWith ([<InlineIfLambda>]mapper: exn -> 'T) (source: ValueTask<'T>) : ValueTask<'T> =
394394
tryWith (mapper >> result) (fun () -> source)
395395

396396
/// <summary>Maps the exception of a faulted task to another exception.</summary>

0 commit comments

Comments
 (0)