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:
@ -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]]
|
||||
}
|
||||
|
Reference in New Issue
Block a user