oid: Fix `impl Arbitrary for Oid`
`fill` would cause the OID to consist of 20 repetitions of the same byte every time, not an arbitrary OID.
This commit is contained in:
parent
deabe6d2ce
commit
88a7252e33
|
|
@ -469,9 +469,7 @@ mod test {
|
||||||
|
|
||||||
impl Arbitrary for Oid {
|
impl Arbitrary for Oid {
|
||||||
fn arbitrary(g: &mut Gen) -> Self {
|
fn arbitrary(g: &mut Gen) -> Self {
|
||||||
let slice = [0u8; Oid::SHA1_LEN];
|
Self::Sha1(<[u8; Oid::LEN_SHA1]>::arbitrary(g))
|
||||||
g.fill(slice);
|
|
||||||
Self::Sha1(slice)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue