MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / arbitrary

Method arbitrary

ipld/resolver/src/arb.rs:16–21  ·  view source on GitHub ↗
(g: &mut quickcheck::Gen)

Source from the content-addressed store, hash-verified

14
15impl Arbitrary for ArbAddress {
16 fn arbitrary(g: &mut quickcheck::Gen) -> Self {
17 let addr = Address::arbitrary(g);
18 let bz = addr.to_bytes();
19 let addr = Address::from_bytes(&bz).expect("address roundtrip works");
20 Self(addr)
21 }
22}
23
24#[derive(Clone, Debug)]

Callers

nothing calls this directly

Calls 1

to_bytesMethod · 0.45

Tested by

no test coverage detected