From 11d7e14557094eb6823cb4aac883605919c56cc5 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Thu, 8 Aug 2024 07:44:25 -0500 Subject: [PATCH] refactor: Use IReadOnlyList instead of IEnumerable IReadOnlyList provides access by index. For example, it can be used in a for loop. --- src/Application/Players/Ranks/RankCollection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Application/Players/Ranks/RankCollection.cs b/src/Application/Players/Ranks/RankCollection.cs index d459c21e..a28aebef 100644 --- a/src/Application/Players/Ranks/RankCollection.cs +++ b/src/Application/Players/Ranks/RankCollection.cs @@ -23,7 +23,7 @@ internal class RankCollection private RankCollection() { } public static int Max => s_ranks.Length; - public static IEnumerable GetAll() => s_ranks; + public static IReadOnlyList GetAll() => s_ranks; public static Result GetById(RankId id) { if ((int)id < 0 || (int)id >= Max)