From 9529b5017f7c1e75721076ff518cce93cd151211 Mon Sep 17 00:00:00 2001 From: maxisoft Date: Tue, 3 Dec 2024 16:21:39 +0100 Subject: [PATCH] Remove AsArray calls --- ASFFreeGames/Redlib/Instances/RedlibInstanceList.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ASFFreeGames/Redlib/Instances/RedlibInstanceList.cs b/ASFFreeGames/Redlib/Instances/RedlibInstanceList.cs index fe89a4e..7ec6264 100644 --- a/ASFFreeGames/Redlib/Instances/RedlibInstanceList.cs +++ b/ASFFreeGames/Redlib/Instances/RedlibInstanceList.cs @@ -89,10 +89,10 @@ internal static List ParseUrls(JsonNode json) { return []; } - List uris = new(instances.AsArray().Count); + List uris = new(((JsonArray) instances).Count); // ReSharper disable once LoopCanBePartlyConvertedToQuery - foreach (JsonNode? instance in instances.AsArray()) { + foreach (JsonNode? instance in (JsonArray) instances) { JsonNode? url = instance?["url"]; if (Uri.TryCreate(url?.GetValue() ?? "", UriKind.Absolute, out Uri? instanceUri) && instanceUri.Scheme is "http" or "https") {