1
0
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:
joe-conigliaro
2019-09-15 19:26:05 +10:00
committed by Alexander Medvednikov
parent 602e472b8a
commit f077fbd32d
18 changed files with 41 additions and 40 deletions

View File

@ -58,7 +58,7 @@ fn main() {
}
if ids.len > 10 {
// ids = ids[:10]
mut tmp := [0 ; 10]
mut tmp := [0].repeat(10)
for i := 0 ; i < 10 ; i++ {
tmp[i] = ids[i]
}