1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

array: replace make() with the new init syntax

This commit is contained in:
Alexander Medvednikov
2020-04-26 17:52:27 +02:00
parent f23948010a
commit 83552a0d58
6 changed files with 24 additions and 27 deletions

View File

@ -11,8 +11,7 @@ const (
// NOTE: temp until we have []bytes(buff)
fn c_array_to_bytes_tmp(len int, buffer voidptr) []byte {
mut arr := []byte{}
arr = make(len, 1, 1)
mut arr := []byte{len:len, cap:1}
arr.data = buffer
/*