#[cfg(any(feature = "appliers", feature = "var-dims"))]
use arrayvec::ArrayVec;
#[cfg(any(feature = "appliers", feature = "var-dims"))]
pub(crate) fn arrvec_into_inner<T, const N: usize>(arrvec: ArrayVec<T, N>, method_name: &str) -> [T; N] {
match arrvec.into_inner() {
Ok(arr) => arr,
_ => panic!(
"Couldn't convert ArrayVec into array in {}() method. \
This operation should never have panicked. Please contact \
the maintainers of PointND if troubles persist",
method_name
)
}
}
#[cfg(any(feature = "appliers", feature = "var-dims"))]
pub const ARRVEC_CAP: usize = u32::MAX as usize;
#[cfg(feature = "appliers")]
pub type ApplyFn<T, U> = fn(T) -> U;
#[cfg(feature = "appliers")]
pub type ApplyDimsFn<T> = fn(T) -> T;
#[cfg(feature = "appliers")]
pub type ApplyValsFn<T, U, V> = fn(T, V) -> U;
#[cfg(feature = "appliers")]
pub type ApplyPointFn<T, U, V> = ApplyValsFn<T, U, V>;