Skip to content

Commit 90f5b71

Browse files
committed
fix tests
1 parent e2db2e2 commit 90f5b71

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/pure/collections/sets.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ when isMainModule and not defined(release):
10201020

10211021
block toSeqAndString:
10221022
var a = toHashSet([2, 7, 5])
1023-
var b = initHashSet[int]()
1023+
var b = initHashSet[int](rightSize(a.len))
10241024
for x in [2, 7, 5]: b.incl(x)
10251025
assert($a == $b)
10261026
#echo a

lib/pure/hashes.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ proc hashData*(data: pointer, size: int): Hash =
9191

9292
proc hashBiggestIntVM(x: BiggestInt): Hash = discard # in vmops
9393

94-
proc hash*(x: string): Hash
94+
proc hash*(x: string): Hash {.noSideEffect.}
9595

9696
proc hashBiggestInt*(x: BiggestInt): Hash {.inline.} =
9797
## for internal use; user code should prefer `hash` overloads

0 commit comments

Comments
 (0)