Remove duplicate Fisher–Yates shuffle impl

This commit is contained in:
Bond_009
2021-10-08 15:20:11 +02:00
parent 556ef5f157
commit dc8feca6bb
2 changed files with 52 additions and 76 deletions

View File

@@ -8,8 +8,6 @@ namespace Jellyfin.Extensions
/// </summary>
public static class ShuffleExtensions
{
private static readonly Random _rng = new Random();
/// <summary>
/// Shuffles the items in a list.
/// </summary>
@@ -17,7 +15,7 @@ namespace Jellyfin.Extensions
/// <typeparam name="T">The type.</typeparam>
public static void Shuffle<T>(this IList<T> list)
{
list.Shuffle(_rng);
list.Shuffle(Random.Shared);
}
/// <summary>