added some auto-conversion
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good

This commit is contained in:
2022-09-13 09:52:59 +02:00
parent d559646d80
commit 28ba4f887d
3 changed files with 28 additions and 32 deletions

View File

@ -41,7 +41,13 @@ pub enum PusError {
NoRawData,
/// CRC16 needs to be calculated first
CrcCalculationMissing,
PacketError(ByteConversionError),
ByteConversionError(ByteConversionError),
}
impl From<ByteConversionError> for PusError {
fn from(e: ByteConversionError) -> Self {
PusError::ByteConversionError(e)
}
}
pub trait PusPacket: CcsdsPacket {