mirror of
https://github.com/logos-storage/nim-json-rpc.git
synced 2026-01-16 20:43:08 +00:00
Don't export bytes iterator for stint types
This commit is contained in:
parent
50924d1c12
commit
ab77d3a371
@ -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