Skip to content

Commit

Permalink
0.0.7: rm guard
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Mar 7, 2023
1 parent b5c49ec commit fd6bfa3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions redis.nim
Original file line number Diff line number Diff line change
Expand Up @@ -885,12 +885,10 @@ proc parseArrayWithScores*(results: openArray[string]): seq[(string, float)] =
if results.len > 0:
for index in 0..<(results.len div 2):
template score: string {.dirty.} = results[(index * 2) + 1]
when not defined(release):
# guard something crazy coming out of redis
if score in ["", "inf", "Inf", "-inf", "-Inf", "nan", "NaN"]:
raise Defect.newException "unexpected score: " & repr(score)
let value =
case score
of "":
raise Defect.newException "unexpectedly empty score"
of "-inf", "-Inf":
-Inf
of "inf", "Inf":
Expand Down
2 changes: 1 addition & 1 deletion redis.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.0.6"
version = "0.0.7"
author = "disruptek"
description = "redis rewrite, right"
license = "MIT"

0 comments on commit fd6bfa3

Please # to comment.