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:
Lorenz Leutgeb 2026-04-24 00:08:22 +02:00 committed by Lorenz Leutgeb
parent deabe6d2ce
commit 88a7252e33
1 changed files with 1 additions and 3 deletions

View File

@ -469,9 +469,7 @@ mod test {
impl Arbitrary for Oid {
fn arbitrary(g: &mut Gen) -> Self {
let slice = [0u8; Oid::SHA1_LEN];
g.fill(slice);
Self::Sha1(slice)
Self::Sha1(<[u8; Oid::LEN_SHA1]>::arbitrary(g))
}
}
}