Skip to content

Commit 460ea51

Browse files
committed
Using Count instead of Any()
1 parent be72930 commit 460ea51

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Rqlite.Client/RqliteClient.GetResultsAsync.cs

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System;
55
using System.Collections.Generic;
6-
using System.Linq;
76
using System.Net.Http;
87
using System.Text.Json;
98
using System.Threading.Tasks;
@@ -32,12 +31,12 @@ internal async Task<Result<List<T>>> GetResultsAsync<T>(HttpRequestMessage reque
3231
request
3332
)
3433
.BindAsync(
35-
x => x.Errors.Any() switch
34+
x => x.Errors.Count switch
3635
{
37-
false =>
36+
> 0 =>
3837
R.Wrap(x.Results),
3938

40-
true =>
39+
_ =>
4140
R.Err(string.Join(Environment.NewLine, x.Errors))
4241
}
4342
);

0 commit comments

Comments
 (0)