the error type for SmallVec is defined on lib.rs:141 as follows:
/// Error type for APIs with fallible heap allocation
#[derive(Debug)]
pub enum CollectionAllocErr {
/// Overflow `usize::MAX` or other error during size computation
CapacityOverflow,
/// The allocator return an error
AllocErr {
/// The layout that was passed to the allocator
layout: Layout
}
}
impl core::fmt::Display for CollectionAllocErr {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "Allocation error: {:?}", self)
}
}
impl core::error::Error for CollectionAllocErr {}
move the full enum + all implementations to errors.rs
make sure the code compiles and everything works after that
the type must still be exported on the public API, which will mean that a re-export on lib.rs needs to be added
the error type for
SmallVecis defined onlib.rs:141as follows:move the full enum + all implementations to
errors.rsmake sure the code compiles and everything works after that
the type must still be exported on the public API, which will mean that a re-export on
lib.rsneeds to be added