From 4d13246edbfda0a4620605739cee5b6c0e244550 Mon Sep 17 00:00:00 2001 From: lilkeet Date: Sun, 3 Nov 2024 00:06:17 -0500 Subject: [PATCH] better hash set initializer --- src/digraph.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/digraph.nim b/src/digraph.nim index 701166a..fa389dd 100644 --- a/src/digraph.nim +++ b/src/digraph.nim @@ -104,7 +104,7 @@ func incl*[T]( dig: var DiGraph[T]; value: sink T ) {.inline, raises: [].} = ## Adds a new node to the graph if its not already added. if not dig.valuesToChildren.hasKey(value): - dig.valuesToChildren[value] = HashSet[T]() + dig.valuesToChildren[value] = initHashSet[T](8) func incl*[T]( dig: var DiGraph[T]; toAdd: varargs[T] ) {.inline, raises: [].} =