This commit is contained in:
Araq 2014-08-31 01:07:58 +02:00
commit 09ab1703e1
6 changed files with 30 additions and 13 deletions

View file

@ -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 =