parent
f2e8c39e85
commit
ce7f29e8e6
6 changed files with 31 additions and 22 deletions
|
|
@ -202,7 +202,7 @@ when false:
|
|||
assert i < x.len
|
||||
x.data[i] = y
|
||||
|
||||
proc `@`*[T](elems: openArray[T]): NimSeqV2[T] =
|
||||
proc `@`*[T](elems: sink openArray[T]): NimSeqV2[T] =
|
||||
result.cap = elems.len
|
||||
result.len = elems.len
|
||||
result.data = cast[type(result.data)](alloc(result.cap * sizeof(T)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue