We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2a07e95 + 55cccfb commit 5d52962Copy full SHA for 5d52962
1 file changed
src/Dbosoft.Functional/UseExtensions.cs
@@ -11,8 +11,8 @@ public static class UseExtensions
11
{
12
public static EitherAsync<L, R2> Use<L, R1, R2>(this EitherAsync<L, R1> self, Func<EitherAsync<L, R1>, EitherAsync<L, R2>> map) where R1 : IDisposable
13
14
- var res = self.Bind(f => use(f, f1 => map(self)));
15
- return res;
+ var res = self.ToEither().BindAsync(f => use(f, f1 => map(self).ToEither()));
+ return res.ToAsync();
16
}
17
18
public static Task<Either<L, R2>> Use<L, R1, R2>(this Task<Either<L, R1>> self, Func<Task<Either<L, R1>>, Task<Either<L, R2>>> map) where R1 : IDisposable
0 commit comments