cleanup Ordinal (#13501)
This commit is contained in:
parent
42dad3a836
commit
6a0e87eb38
7 changed files with 36 additions and 10 deletions
|
|
@ -112,7 +112,7 @@ proc hash*[T: proc](x: T): Hash {.inline.} =
|
|||
else:
|
||||
result = hash(pointer(x))
|
||||
|
||||
proc hash*(x: int|int64|uint|uint64|char|Ordinal): Hash {.inline.} =
|
||||
proc hash*[T: Ordinal](x: T): Hash {.inline.} =
|
||||
## Efficient hashing of integers.
|
||||
cast[Hash](ord(x))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue