mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib: change [0;n]
to [0].repeat(n)
This commit is contained in:

committed by
Alexander Medvednikov

parent
602e472b8a
commit
f077fbd32d
@ -1,7 +1,7 @@
|
||||
import rand
|
||||
|
||||
fn gen_randoms(seed int) []int {
|
||||
mut randoms := [0; 20]
|
||||
mut randoms := [0].repeat(20)
|
||||
rand.seed(seed)
|
||||
for i in 0..20 {
|
||||
randoms[i] = rand.next(100)
|
||||
|
Reference in New Issue
Block a user