make more things compile without isNil

This commit is contained in:
Araq 2018-08-22 15:12:02 +02:00
commit dbd21d670c
3 changed files with 3 additions and 4 deletions

View file

@ -654,7 +654,7 @@ proc isValid*[A](s: OrderedSet[A]): bool =
## proc saveTarotCards(cards: OrderedSet[int]) =
## assert cards.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: OrderedSet[A]): int {.inline.} =
## Returns the number of keys in `s`.