chore: fix 'there should not be `high(value)`. use `high(type)`' deprecation (#147)

This commit is contained in:
Lorenzo Delgado 2022-11-09 14:48:38 +01:00 committed by GitHub
parent 23da07c9b5
commit ba687c37a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -194,7 +194,7 @@ proc newRbTreeRef*[C,K](cmp: RbCmpFn[C,K]; mkc: RbMkcFn[C,K]): RbTreeRef[C,K] =
proc newWalkId*[C,K](rbt: RbTreeRef[C,K]): uint {.inline.} =
## Generate new free walk ID, returns zero in (theoretical) case all other
## IDs are exhausted.
for id in rbt.walkIdGen .. rbt.walkIdGen.high:
for id in rbt.walkIdGen .. high(type rbt.walkIdGen):
if not rbt.walks.hasKey(id):
rbt.walkIdGen = id
return id