fix: type mismatch in task extensions
All checks were successful
default / dotnet default workflow (8.0) (push) Successful in 1m10s
All checks were successful
default / dotnet default workflow (8.0) (push) Successful in 1m10s
This commit is contained in:
parent
0ff9cfd8fb
commit
b3ed128536
1 changed files with 4 additions and 4 deletions
|
@ -18,7 +18,7 @@ public static partial class Extensions
|
|||
/// Maps the success value of the result object of the completed task using a mapping function, or does nothing if
|
||||
/// the result object of the completed task is a failure.
|
||||
/// </summary>
|
||||
/// <param name="result">A task object retunring a result object when completing.</param>
|
||||
/// <param name="result">A task object returning a result object when completing.</param>
|
||||
/// <param name="func">The function used to map the success value.</param>
|
||||
/// <typeparam name="T">The type of the object inside the result returned by the task.</typeparam>
|
||||
/// <typeparam name="TNew">The type of the new value.</typeparam>
|
||||
|
@ -26,7 +26,7 @@ public static partial class Extensions
|
|||
/// result.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static async ValueTask<Result<TNew>> Map<T, TNew>(this Task<Result<T>> result,
|
||||
public static async Task<Result<TNew>> Map<T, TNew>(this Task<Result<T>> result,
|
||||
Func<T, TNew> func)
|
||||
=> (await result).Map(func);
|
||||
|
||||
|
@ -40,7 +40,7 @@ public static partial class Extensions
|
|||
/// Maps the success value of the result object of the completed task to a new result using a mapping function, or
|
||||
/// does nothing if the result object of the completed task is a failure.
|
||||
/// </summary>
|
||||
/// <param name="result">A task object retunring a result object when completing.</param>
|
||||
/// <param name="result">A task object returning a result object when completing.</param>
|
||||
/// <param name="func">The function used to map the success value.</param>
|
||||
/// <typeparam name="T">The type of the object inside the result returned by the task.</typeparam>
|
||||
/// <typeparam name="TNew">The type of the new value.</typeparam>
|
||||
|
@ -65,7 +65,7 @@ public static partial class Extensions
|
|||
/// <inheritdoc cref="Map{T,TNew}(System.Threading.Tasks.Task{Geekeey.Extensions.Result.Result{T}},System.Func{T,TNew})"/>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static async Task<Result<TNew>> Map<T, TNew>(this ValueTask<Result<T>> result,
|
||||
public static async ValueTask<Result<TNew>> Map<T, TNew>(this ValueTask<Result<T>> result,
|
||||
Func<T, TNew> func)
|
||||
=> (await result).Map(func);
|
||||
|
||||
|
|
Loading…
Reference in a new issue