pub(crate) fn alloc_if<T, A: Allocator<T>>( condition: bool, alloc: &mut A, len: usize, ) -> A::AllocatedMemory
Helper function to allocate memory or return a default value if the condition is false