This commit is contained in:
Andreas Rumpf 2020-05-11 19:12:40 +02:00 • committed by GitHub
commit 0f344a70c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 11 deletions

View file

@ -228,7 +228,7 @@ proc enlarge(t: StringTableRef) =
var n: KeyValuePairSeq
newSeq(n, len(t.data) * growthFactor)
for i in countup(0, high(t.data)):
if t.data[i].hasValue: rawInsert(t, n, t.data[i].key, t.data[i].val)
if t.data[i].hasValue: rawInsert(t, n, move t.data[i].key, move t.data[i].val)
swap(t.data, n)
proc `[]=`*(t: StringTableRef, key, val: string) {.