1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: simplify infer_fn_generic_types() (#15408)

This commit is contained in:
yuyi
2022-08-11 19:25:43 +08:00
committed by GitHub
parent 275a997ec1
commit 9e0bf005f7
2 changed files with 8 additions and 13 deletions

View File

@ -376,7 +376,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}
rng.shuffle(mut indices)?
rng.shuffle<int>(mut indices)?
for i in 0 .. k {
results[i] = array[indices[i]]
}