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 {
fn from(err: LayoutCalculatorError) -> Self {
impl<F> From<LayoutCalculatorError<F>> for LayoutError {
fn from(err: LayoutCalculatorError<F>) -> Self {
match err {
LayoutCalculatorError::UnexpectedUnsized | LayoutCalculatorError::EmptyUnion => {
LayoutCalculatorError::UnexpectedUnsized(_) | LayoutCalculatorError::EmptyUnion => {
LayoutError::Unknown
}
LayoutCalculatorError::SizeOverflow => LayoutError::SizeOverflow,