Skip to content

Commit

Permalink
refactor: Use IReadOnlyList instead of IEnumerable
Browse files Browse the repository at this point in the history
IReadOnlyList provides access by index.
For example, it can be used in a for loop.
  • Loading branch information
MrDave1999 committed Aug 8, 2024
1 parent f05343e commit 11d7e14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Application/Players/Ranks/RankCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal class RankCollection

private RankCollection() { }
public static int Max => s_ranks.Length;
public static IEnumerable<IRank> GetAll() => s_ranks;
public static IReadOnlyList<IRank> GetAll() => s_ranks;
public static Result<IRank> GetById(RankId id)
{
if ((int)id < 0 || (int)id >= Max)
Expand Down

0 comments on commit 11d7e14

Please sign in to comment.