pub(crate) fn alloc_or_default<T, A: Allocator<T>>(
alloc: &mut A,
len: usize,
) -> A::AllocatedMemory
Expand description
Helper function to allocate memory or return a default value when the size is 0.
pub(crate) fn alloc_or_default<T, A: Allocator<T>>(
alloc: &mut A,
len: usize,
) -> A::AllocatedMemory
Helper function to allocate memory or return a default value when the size is 0.