fixes for pdu error enum

This commit is contained in:
2023-08-17 21:04:27 +02:00
parent 990b8de519
commit 9dfc593d2a
4 changed files with 6 additions and 7 deletions

View File

@ -106,7 +106,7 @@ impl EofPdu {
}
generic_length_checks_pdu_deserialization(buf, min_expected_len, full_len_without_crc)?;
let directive_type = FileDirectiveType::try_from(buf[current_idx]).map_err(|_| {
PduError::InvalidDirectiveType((buf[current_idx], FileDirectiveType::EofPdu))
PduError::InvalidDirectiveType((buf[current_idx], Some(FileDirectiveType::EofPdu)))
})?;
if directive_type != FileDirectiveType::EofPdu {
return Err(PduError::WrongDirectiveType((