fixes #1444
This commit is contained in:
parent
dcc00b3960
commit
2c99991d16
6 changed files with 165 additions and 9 deletions
|
|
@ -128,7 +128,7 @@ proc mget*[A](s: var TSet[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(EInvalidKey, "key not found: " & $key)
|
||||
|
||||
proc contains*[A](s: TSet[A], key: A): bool =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue