Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
No point in making this available for all IEnumerables, only ICollections are affected
  • Loading branch information
JustArchi committed Aug 16, 2024
1 parent b6805a9 commit 5a41d55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ArchiSteamFarm/Core/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public static class Utilities {
private static readonly FrozenSet<char> DirectorySeparators = new HashSet<char>(2) { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }.ToFrozenSet();

[PublicAPI]
public static IEnumerable<T> AsLinqThreadSafeEnumerable<T>(this IEnumerable<T> enumerable) {
ArgumentNullException.ThrowIfNull(enumerable);
public static IEnumerable<T> AsLinqThreadSafeEnumerable<T>(this ICollection<T> 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]
Expand Down

0 comments on commit 5a41d55

Please sign in to comment.