mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-02-17 15:27:28 +00:00
use get() instead of tryGet()
This commit is contained in:
parent
ce15948b70
commit
7a03685edd
@ -42,7 +42,7 @@ proc example*(_: type Pricing): Pricing =
|
|||||||
proc example*(_: type Block): Block =
|
proc example*(_: type Block): Block =
|
||||||
let length = rand(4096)
|
let length = rand(4096)
|
||||||
let bytes = newSeqWith(length, rand(uint8))
|
let bytes = newSeqWith(length, rand(uint8))
|
||||||
Block.init(bytes).tryGet
|
Block.init(bytes).get()
|
||||||
|
|
||||||
proc example*(_: type PeerId): PeerID =
|
proc example*(_: type PeerId): PeerID =
|
||||||
let key = PrivateKey.random(Rng.instance[]).get
|
let key = PrivateKey.random(Rng.instance[]).get
|
||||||
|
Loading…
x
Reference in New Issue
Block a user