Revert "use `rng.shuffle(mut indices) ?` again"

This reverts commit 15ca57c3de.
pull/13824/head
Delyan Angelov 2022-04-01 18:18:51 +03:00
parent 3131c279ad
commit 565c012554
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 1 additions and 1 deletions

View File

@ -328,7 +328,7 @@ pub fn (mut rng PRNG) choose<T>(array []T, k int) ?[]T {
mut results := []T{len: k}
mut indices := []int{len: n, init: it}
// enfoce the type to int to avoid ambiguity
rng.shuffle(mut indices) ?
rng.shuffle<int>(mut indices) ?
for i in 0 .. k {
results[i] = array[indices[i]]
}