1use rand::distributions::{Distribution, Standard};
2use rand::prelude::*;
3use rand::rngs::StdRng;
4
5pub fn vec<T>(size: usize, start: usize) -> Option<Vec<T>>
6where
7 Standard: Distribution<T>,
8{
9 if size > start + 2 {
10 let mut rng = StdRng::from_entropy();
11
12 Some((0..size).map(|_| rng.gen()).collect())
13 } else {
14 None
15 }
16}
17