assert that unexpectedly unsized fields are sized in the param env

This commit is contained in:
Lukas Markeffsky 2024-09-16 21:04:20 +02:00
parent 08344c2ae8
commit cd442a0577

View file

@ -106,10 +106,10 @@ impl fmt::Display for LayoutError {
} }
} }
impl From<LayoutCalculatorError> for LayoutError { impl<F> From<LayoutCalculatorError<F>> for LayoutError {
fn from(err: LayoutCalculatorError) -> Self { fn from(err: LayoutCalculatorError<F>) -> Self {
match err { match err {
LayoutCalculatorError::UnexpectedUnsized | LayoutCalculatorError::EmptyUnion => { LayoutCalculatorError::UnexpectedUnsized(_) | LayoutCalculatorError::EmptyUnion => {
LayoutError::Unknown LayoutError::Unknown
} }
LayoutCalculatorError::SizeOverflow => LayoutError::SizeOverflow, LayoutCalculatorError::SizeOverflow => LayoutError::SizeOverflow,