pub type Error = String;
pub(crate) fn convert<A, B>(n: A) -> B
where
A: TryInto<B>,
<A as TryInto<B>>::Error: std::fmt::Debug,
{
TryInto::<B>::try_into(n).unwrap()
}
pub(crate) fn convert_vec<A, B>(v: &[A]) -> Vec<B>
where
A: Copy + TryInto<B>,
<A as TryInto<B>>::Error: std::fmt::Debug,
{
v.iter().map(|a| convert::<A, B>(*a)).collect()
}