(data: &[Vec<u32>], capacity: usize)
| 100 | } |
| 101 | |
| 102 | fn from_slice(data: &[Vec<u32>], capacity: usize) -> Buffer { |
| 103 | hint::black_box({ |
| 104 | let mut a = Vec::<u32>::with_capacity(capacity); |
| 105 | |
| 106 | data.iter().for_each(|vec| a.extend(vec)); |
| 107 | |
| 108 | Buffer::from(a.to_byte_slice()) |
| 109 | }) |
| 110 | } |
| 111 | |
| 112 | fn create_data(size: usize) -> Vec<Vec<u32>> { |
| 113 | let rng = &mut seedable_rng(); |