Open
Description
Because of #265, it's no longer possible to do something like
#[derive(Clone, Debug)]
#[cfg_attr(test, derive(PartialEq, Eq))]
struct Foo {
foo: ChaChaPolyNonce, // has a BorrowMut<[u8]> impl
}
#[cfg(test)]
impl quickcheck::Arbitrary for Foo {
fn arbitrary(g: &mut quickcheck::Gen) -> Self {
let mut foo = ChaChaPolyNonce::default();
g.fill_bytes(&mut foo); // No more RngCore!
Self { foo }
}
}
But it seems as though it would be reasonable to simply have an Arbitrary
implementation for &mut [T: Arbitrary]
that does fill_bytes
internally.
Metadata
Metadata
Assignees
Labels
No labels
Activity