Skip to content

Commit

Permalink
Исправляет предупреждения
Browse files Browse the repository at this point in the history
  • Loading branch information
inyutin-maxim committed Sep 11, 2023
1 parent 668329b commit a357837
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VkNet/Utils/RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private async Task<HttpResponse<string>> CallAsync(Func<Task<HttpResponseMessage
var response = await method()
.ConfigureAwait(false);

var bytes = await response.Content.ReadAsByteArrayAsync()
var bytes = await response.Content.ReadAsByteArrayAsync(token)

Check failure on line 92 in VkNet/Utils/RestClient.cs

View workflow job for this annotation

GitHub Actions / build

No overload for method 'ReadAsByteArrayAsync' takes 1 arguments

Check failure on line 92 in VkNet/Utils/RestClient.cs

View workflow job for this annotation

GitHub Actions / build

No overload for method 'ReadAsByteArrayAsync' takes 1 arguments
.ConfigureAwait(false);

var content = encoding.GetString(bytes, 0, bytes.Length);
Expand Down
3 changes: 1 addition & 2 deletions VkNet/Utils/VkErrorFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ public static VkApiMethodInvokeException Create(VkError error)
return exception ?? new VkApiMethodInvokeException(error);
}

private static Func<ConstructorInfo, bool> Predicate() => x => x.GetParameters()
.Any(p => p.ParameterType == typeof(VkError));
private static Func<ConstructorInfo, bool> Predicate() => x => Array.Exists(x.GetParameters(), p => p.ParameterType == typeof(VkError));

private static bool HasErrorCode(MemberInfo x, int errorCode) =>
((VkErrorAttribute) Attribute.GetCustomAttribute(x, typeof(VkErrorAttribute))).ErrorCode == errorCode;
Expand Down

0 comments on commit a357837

Please sign in to comment.