fixes #1444
This commit is contained in:
parent
c9563d28a8
commit
09ab1703e1
6 changed files with 30 additions and 13 deletions
|
|
@ -130,7 +130,7 @@ proc mget*[A](s: var HashSet[A], key: A): var A =
|
|||
## for sharing.
|
||||
assert s.isValid, "The set needs to be initialized."
|
||||
var index = rawGet(s, key)
|
||||
if index >= 0: result = t.data[index].key
|
||||
if index >= 0: result = s.data[index].key
|
||||
else: raise newException(KeyError, "key not found: " & $key)
|
||||
|
||||
proc contains*[A](s: HashSet[A], key: A): bool =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue