palcrypto_rs/
utils.rs

1pub fn vec2array<T, const N: usize>(v: Vec<T>) -> [T; N] {
2    v.try_into()
3        .unwrap_or_else(|v: Vec<T>| panic!("Expected a Vec of length {} but it was {}", N, v.len()))
4}