use system.move instead of system.shallowCopy if the GC mode requires it
This commit is contained in:
parent
68ce808db1
commit
60d64d1aef
14 changed files with 61 additions and 36 deletions
|
|
@ -540,7 +540,7 @@ proc take*[A, B](t: var Table[A, B], key: A, val: var B): bool =
|
|||
var index = rawGet(t, key, hc)
|
||||
result = index >= 0
|
||||
if result:
|
||||
shallowCopy(val, t.data[index].val)
|
||||
val = move(t.data[index].val)
|
||||
delImplIdx(t, index)
|
||||
|
||||
proc clear*[A, B](t: var Table[A, B]) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue