even more strict isNil handling for strings/seqs in order to detect bugs

This commit is contained in:
Araq 2018-08-22 12:35:46 +02:00
commit 64517445ea
36 changed files with 193 additions and 245 deletions

View file

@ -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`.