summary refs log tree commit diff stats
path: root/tools/heapdumprepl.nim
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-08-20 03:42:51 +0800
committerGitHub <noreply@github.com>2022-08-19 15:42:51 -0400
commitc9c1c97f1ec394cc5e7638825d806413b874c080 (patch)
treea4c40acbb9c033c4cf20c35e10514a32ee9a3783 /tools/heapdumprepl.nim
parente8657c7107761fae7a8b5559df3b88165c238a12 (diff)
downloadNim-c9c1c97f1ec394cc5e7638825d806413b874c080.tar.gz
make sure tools/heapdumprepl.nim continues to compile (#20146)
Diffstat (limited to 'tools/heapdumprepl.nim')
-rw-r--r--tools/heapdumprepl.nim6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/heapdumprepl.nim b/tools/heapdumprepl.nim
index 62454165d..4f06cf111 100644
--- a/tools/heapdumprepl.nim
+++ b/tools/heapdumprepl.nim
@@ -1,4 +1,3 @@
-
 include std/prelude
 import intsets
 
@@ -17,7 +16,6 @@ type
     roots: Table[int, NodeKind]
 
 proc add(father: Node; son: int) =
-  if father.kids.isNil: father.kids = @[]
   father.kids.add(son)
 
 proc renderNode(g: Graph; id: int) =
@@ -141,8 +139,8 @@ proc importData(input: string): Graph =
     close(i)
   else:
     quit "error: cannot open " & input
-  shallowCopy(result.nodes, nodes)
-  shallowCopy(result.roots, roots)
+  result.nodes = move nodes
+  result.roots = move roots
 
 if paramCount() == 1:
   repl(importData(paramStr(1)))