From b3ed1285364903959b2c643062e52a5f6a388d76 Mon Sep 17 00:00:00 2001 From: Louis Seubert Date: Wed, 3 Jul 2024 22:26:43 +0200 Subject: [PATCH] fix: type mismatch in task extensions --- src/Result/Extensions/Extensions.Task.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Result/Extensions/Extensions.Task.cs b/src/Result/Extensions/Extensions.Task.cs index ed933c3..05e530e 100644 --- a/src/Result/Extensions/Extensions.Task.cs +++ b/src/Result/Extensions/Extensions.Task.cs @@ -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. /// - /// A task object retunring a result object when completing. + /// A task object returning a result object when completing. /// The function used to map the success value. /// The type of the object inside the result returned by the task. /// The type of the new value. @@ -26,7 +26,7 @@ public static partial class Extensions /// result. [MethodImpl(MethodImplOptions.AggressiveInlining)] // ReSharper disable once InconsistentNaming - public static async ValueTask> Map(this Task> result, + public static async Task> Map(this Task> result, Func 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. /// - /// A task object retunring a result object when completing. + /// A task object returning a result object when completing. /// The function used to map the success value. /// The type of the object inside the result returned by the task. /// The type of the new value. @@ -65,7 +65,7 @@ public static partial class Extensions /// [MethodImpl(MethodImplOptions.AggressiveInlining)] // ReSharper disable once InconsistentNaming - public static async Task> Map(this ValueTask> result, + public static async ValueTask> Map(this ValueTask> result, Func func) => (await result).Map(func);