We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bc4fea commit 8830af5Copy full SHA for 8830af5
vlib/rand/rand.v
@@ -327,9 +327,7 @@ pub fn (mut rng PRNG) choose<T>(array []T, k int) ?[]T {
327
}
328
mut results := []T{len: k}
329
mut indices := []int{len: n, init: it}
330
- // TODO: see why exactly it is necessary to enfoce the type here in Checker.infer_fn_generic_types
331
- // (v errors with: `inferred generic type T is ambiguous: got int, expected string`, when <int> is missing)
332
- rng.shuffle<int>(mut indices) ?
+ rng.shuffle(mut indices) ?
333
for i in 0 .. k {
334
results[i] = array[indices[i]]
335
0 commit comments