Merge remote-tracking branch 'origin/main' into refactoring-ecss-packet-mods

This commit is contained in:
2023-07-10 00:38:07 +02:00
7 changed files with 72 additions and 80 deletions

View File

@ -151,7 +151,7 @@ pub enum PusError {
NoRawData,
/// CRC16 needs to be calculated first
CrcCalculationMissing,
ByteConversionError(ByteConversionError),
ByteConversion(ByteConversionError),
}
impl Display for PusError {
@ -175,7 +175,7 @@ impl Display for PusError {
PusError::CrcCalculationMissing => {
write!(f, "crc16 was not calculated")
}
PusError::ByteConversionError(e) => {
PusError::ByteConversion(e) => {
write!(f, "low level byte conversion error: {e}")
}
}
@ -185,7 +185,7 @@ impl Display for PusError {
#[cfg(feature = "std")]
impl Error for PusError {
fn source(&self) -> Option<&(dyn Error + 'static)> {
if let PusError::ByteConversionError(e) = self {
if let PusError::ByteConversion(e) = self {
return Some(e);
}
None
@ -194,7 +194,7 @@ impl Error for PusError {
impl From<ByteConversionError> for PusError {
fn from(e: ByteConversionError) -> Self {
PusError::ByteConversionError(e)
PusError::ByteConversion(e)
}
}