vlib,cgen: cleanup array inits using `.repeat() instead of new init syntax

This commit is contained in:
Emily Hudson 2020-06-27 20:46:04 +01:00 committed by GitHub
parent 2669610be9
commit c84bafbdae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 52 additions and 53 deletions

View file

@ -16,7 +16,7 @@ const (
fn gen_randoms(seed_data []u32, bound int) []u64 {
bound_u64 := u64(bound)
mut randoms := [u64(0)].repeat(20)
mut randoms := []u64{len:(20)}
mut rnd := wyrand.WyRandRNG{}
rnd.seed(seed_data)
for i in 0 .. 20 {