Можно ли выполнить ту же работу с помощью адаптеров iter?
fn mutiply_bytes(buf_in: &[u8], mul: usize) -> Vec<u8> {
let length = buf_in.len() * mul;
let mut buf_out = Vec::with_capacity(length);
for i in 0..length{
buf_out.push(buf_in[i%buf_in.len()]);
}
buf_out
}