From 5a41d559a396a372bc19aaa09f114a62fbc4e22e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Fri, 16 Aug 2024 03:35:09 +0200 Subject: [PATCH] Misc No point in making this available for all IEnumerables, only ICollections are affected --- ArchiSteamFarm/Core/Utilities.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArchiSteamFarm/Core/Utilities.cs b/ArchiSteamFarm/Core/Utilities.cs index 314a8368f..6f94e887b 100644 --- a/ArchiSteamFarm/Core/Utilities.cs +++ b/ArchiSteamFarm/Core/Utilities.cs @@ -56,11 +56,11 @@ public static class Utilities { private static readonly FrozenSet DirectorySeparators = new HashSet(2) { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }.ToFrozenSet(); [PublicAPI] - public static IEnumerable AsLinqThreadSafeEnumerable(this IEnumerable enumerable) { - ArgumentNullException.ThrowIfNull(enumerable); + public static IEnumerable AsLinqThreadSafeEnumerable(this ICollection collection) { + ArgumentNullException.ThrowIfNull(collection); // See: https://github.com/dotnet/runtime/discussions/50687 - return enumerable.Select(static entry => entry); + return collection.Select(static entry => entry); } [PublicAPI]