This commit is contained in:
Andreas Rumpf
2019-08-24 06:25:47 +02:00
committed by GitHub
parent f2e8c39e85
commit ce7f29e8e6
6 changed files with 31 additions and 22 deletions

View File

@@ -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)))