mirror of
https://github.com/status-im/nim-json-rpc.git
synced 2025-02-24 10:18:15 +00:00
Don't export bytes
iterator for stint
types
This commit is contained in:
parent
5d0cb19aa1
commit
e5e09718db
@ -1,6 +1,6 @@
|
||||
import json, stint
|
||||
|
||||
iterator bytes*(i: UInt256|Int256): byte =
|
||||
iterator bytes(i: UInt256|Int256): byte =
|
||||
let b = cast[ptr array[32, byte]](i.unsafeaddr)
|
||||
var pos = 0
|
||||
while pos < 32:
|
||||
@ -19,7 +19,6 @@ proc `%`*(n: Int256): JsonNode =
|
||||
for elem in n.bytes:
|
||||
result.add(%int(elem))
|
||||
|
||||
proc `%`*(n: byte): JsonNode =
|
||||
## Generic constructor for JSON data. Creates a new `JInt JsonNode`.
|
||||
proc `%`*(n: byte{not lit}): JsonNode =
|
||||
result = newJInt(int(n))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user