Due to the way arbitrary guesses the length of last element in take_rest logic, there's no way to represent vec![vec![]] using the arbitrary format.
use arbitrary::{Arbitrary, Unstructured};
fn arb(b: &[u8]) -> Vec<Vec<u8>> {
<Vec<Vec<u8>> as Arbitrary>::arbitrary_take_rest(Unstructured::new(&b)).unwrap()
}
fn main() {
println!("{:?}", arb(&[]));
println!("{:?}", arb(&[0]));
println!("{:?}", arb(&[1]));
println!("{:?}", arb(&[0, 0]));
println!("{:?}", arb(&[0, 1]));
println!("{:?}", arb(&[1, 0]));
println!("{:?}", arb(&[1, 1]));
}
output:
[]
[[0]]
[[1]]
[[], [0]]
[[], [1]]
[[0], []]
[[1], []]