We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2db2e2 commit 90f5b71Copy full SHA for 90f5b71
lib/pure/collections/sets.nim
@@ -1020,7 +1020,7 @@ when isMainModule and not defined(release):
1020
1021
block toSeqAndString:
1022
var a = toHashSet([2, 7, 5])
1023
- var b = initHashSet[int]()
+ var b = initHashSet[int](rightSize(a.len))
1024
for x in [2, 7, 5]: b.incl(x)
1025
assert($a == $b)
1026
#echo a
lib/pure/hashes.nim
@@ -91,7 +91,7 @@ proc hashData*(data: pointer, size: int): Hash =
91
92
proc hashBiggestIntVM(x: BiggestInt): Hash = discard # in vmops
93
94
-proc hash*(x: string): Hash
+proc hash*(x: string): Hash {.noSideEffect.}
95
96
proc hashBiggestInt*(x: BiggestInt): Hash {.inline.} =
97
## for internal use; user code should prefer `hash` overloads
0 commit comments