diff --git a/src/ecss/mod.rs b/src/ecss/mod.rs index 7389459..8aab2a1 100644 --- a/src/ecss/mod.rs +++ b/src/ecss/mod.rs @@ -210,8 +210,7 @@ pub(crate) fn crc_from_raw_data(raw_data: &[u8]) -> Result total_len - 2 => Err(ByteConversionError::FromSliceTooSmall { found: total_len - 2, expected: current_idx, - } - .into()), + }), _ => Ok(&slice[current_idx..total_len - 2]), } } diff --git a/src/time/cds.rs b/src/time/cds.rs index 8e1a902..37a130f 100644 --- a/src/time/cds.rs +++ b/src/time/cds.rs @@ -1183,10 +1183,10 @@ impl TryFrom> for CdsTime { fn try_from(dt: chrono::DateTime) -> Result { let conversion = ConversionFromChronoDatetime::new(&dt)?; - Ok(Self::generic_from_conversion( + Self::generic_from_conversion( LengthOfDaySegment::Short16Bits, conversion, - )?) + ) } } @@ -1195,10 +1195,10 @@ impl TryFrom> for CdsTime { type Error = CdsError; fn try_from(dt: chrono::DateTime) -> Result { let conversion = ConversionFromChronoDatetime::new(&dt)?; - Ok(Self::generic_from_conversion( + Self::generic_from_conversion( LengthOfDaySegment::Long24Bits, conversion, - )?) + ) } }