(actual: usize, expected: usize)
| 39 | /// Validates that the deserialized length matches the expected array size N. |
| 40 | #[inline(always)] |
| 41 | fn validate_array_length(actual: usize, expected: usize) -> Result<(), Error> { |
| 42 | if actual != expected { |
| 43 | return Err(Error::invalid_data(format!( |
| 44 | "Array length mismatch: expected {}, got {}", |
| 45 | expected, actual |
| 46 | ))); |
| 47 | } |
| 48 | Ok(()) |
| 49 | } |
| 50 | |
| 51 | /// Converts initialized MaybeUninit array to a regular array. |
| 52 | /// # Safety |
no outgoing calls
no test coverage detected