mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 17:44:43 +01:00
Use new Random.Shared instead of creating new instances
This commit is contained in:
@@ -5,13 +5,11 @@ namespace Jellyfin.Extensions.Tests
|
||||
{
|
||||
public static class ShuffleExtensionsTests
|
||||
{
|
||||
private static readonly Random _rng = new Random();
|
||||
|
||||
[Fact]
|
||||
public static void Shuffle_Valid_Correct()
|
||||
{
|
||||
byte[] original = new byte[1 << 6];
|
||||
_rng.NextBytes(original);
|
||||
Random.Shared.NextBytes(original);
|
||||
byte[] shuffled = (byte[])original.Clone();
|
||||
shuffled.Shuffle();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user