diff options
author | Araq <rumpf_a@web.de> | 2020-09-11 14:21:09 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2020-09-11 14:21:09 +0200 |
commit | 9e4920c06851307187e9897be91424dc6640f8d3 (patch) | |
tree | 73b8420cd94a5fe41394edff31981a0c47eadeb6 /lib/pure/collections | |
parent | c4e03b540e34a37c24794ade073bf708ab17b35d (diff) | |
download | Nim-9e4920c06851307187e9897be91424dc6640f8d3.tar.gz |
fixes #15021
Diffstat (limited to 'lib/pure/collections')
-rw-r--r-- | lib/pure/collections/tables.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim index dc21c0539..8d2680815 100644 --- a/lib/pure/collections/tables.nim +++ b/lib/pure/collections/tables.nim @@ -2298,7 +2298,7 @@ proc smallest*[A](t: CountTable[A]): tuple[key: A, val: int] = ## ## See also: ## * `largest proc<#largest,CountTable[A]>`_ - assert t.len > 0 + assert t.len > 0, "counttable is empty" var minIdx = -1 for h in 0 .. high(t.data): if t.data[h].val > 0 and (minIdx == -1 or t.data[minIdx].val > t.data[h].val): @@ -2311,7 +2311,7 @@ proc largest*[A](t: CountTable[A]): tuple[key: A, val: int] = ## ## See also: ## * `smallest proc<#smallest,CountTable[A]>`_ - assert t.len > 0 + assert t.len > 0, "counttable is empty" var maxIdx = 0 for h in 1 .. high(t.data): if t.data[maxIdx].val < t.data[h].val: maxIdx = h |