mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib,cgen: cleanup array inits using `.repeat() instead of new init syntax
This commit is contained in:
@@ -30,7 +30,7 @@ pub fn new_cipher(key []byte) ?Cipher {
|
||||
return error('crypto.rc4: invalid key size ' + key.len.str())
|
||||
}
|
||||
mut c := Cipher{
|
||||
s: [u32(0)].repeat(256)
|
||||
s: []u32{len:(256)}
|
||||
}
|
||||
for i in 0..256 {
|
||||
c.s[i] = u32(i)
|
||||
|
||||
Reference in New Issue
Block a user