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:
@ -399,7 +399,7 @@ pub fn (c byte) is_capital() bool {
|
||||
}
|
||||
|
||||
pub fn (b []byte) clone() []byte {
|
||||
mut res := [byte(0)].repeat(b.len)
|
||||
mut res := []byte{len: b.len}
|
||||
//mut res := make([]byte, {repeat:b.len})
|
||||
for i in 0..b.len {
|
||||
res[i] = b[i]
|
||||
|
Reference in New Issue
Block a user