even more strict isNil handling for strings/seqs in order to detect bugs
This commit is contained in:
parent
9047c3f582
commit
64517445ea
36 changed files with 193 additions and 245 deletions
|
|
@ -74,7 +74,7 @@ proc isValid*[A](s: HashSet[A]): bool =
|
|||
## proc savePreferences(options: HashSet[string]) =
|
||||
## assert options.isValid, "Pass an initialized set!"
|
||||
## # Do stuff here, may crash in release builds!
|
||||
result = not s.data.isNil
|
||||
result = s.data.len > 0
|
||||
|
||||
proc len*[A](s: HashSet[A]): int =
|
||||
## Returns the number of keys in `s`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue