Skip to content

Commit

Permalink
better hash set initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
lilkeet committed Nov 3, 2024
1 parent 3ec8bfb commit 4d13246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/digraph.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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: [].} =
Expand Down

0 comments on commit 4d13246

Please sign in to comment.