From 026173514f6b9b58f599522bf466c15e469d0a3a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 8 Nov 2024 15:53:28 +0100 Subject: [PATCH] prep v0.13.0 --- CHANGELOG.md | 7 +++++++ Cargo.toml | 2 +- src/cfdp/pdu/mod.rs | 4 +++- src/cfdp/tlv/msg_to_user.rs | 11 ++++++++--- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29d7729..17e534a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,10 +8,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/). # [unreleased] +# [v0.13.0] 2024-11-08 + - Bumped MSRV to 1.81.0 - Bump `zerocopy` to v0.8.0 - Bump `thiserror` to v2.0.0 +## Changed + +- Migrated all Error implementations to thiserror, improved some naming and error handling in + general + # [v0.12.0] 2024-09-10 - Bumped MSRV to 1.70.0 diff --git a/Cargo.toml b/Cargo.toml index 3058346..a05162e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacepackets" -version = "0.12.0" +version = "0.13.0" edition = "2021" rust-version = "1.81.0" authors = ["Robin Mueller "] diff --git a/src/cfdp/pdu/mod.rs b/src/cfdp/pdu/mod.rs index 4f6eef3..50f2eba 100644 --- a/src/cfdp/pdu/mod.rs +++ b/src/cfdp/pdu/mod.rs @@ -42,7 +42,9 @@ pub enum PduError { /// Invalid length for the entity ID detected. Only the values 1, 2, 4 and 8 are supported. #[error("invalid transaction ID length {0}")] InvalidTransactionSeqNumLen(u8), - #[error("missmatch of PDU source ID length {src_id_len} and destination ID length {dest_id_len}")] + #[error( + "missmatch of PDU source ID length {src_id_len} and destination ID length {dest_id_len}" + )] SourceDestIdLenMissmatch { src_id_len: usize, dest_id_len: usize, diff --git a/src/cfdp/tlv/msg_to_user.rs b/src/cfdp/tlv/msg_to_user.rs index 0b7bd96..5dc7346 100644 --- a/src/cfdp/tlv/msg_to_user.rs +++ b/src/cfdp/tlv/msg_to_user.rs @@ -2,7 +2,10 @@ #[cfg(feature = "alloc")] use super::TlvOwned; use super::{GenericTlv, ReadableTlv, Tlv, TlvLvError, TlvType, TlvTypeField, WritableTlv}; -use crate::{cfdp::{InvalidTlvTypeFieldError, TlvLvDataTooLargeError}, ByteConversionError}; +use crate::{ + cfdp::{InvalidTlvTypeFieldError, TlvLvDataTooLargeError}, + ByteConversionError, +}; use delegate::delegate; #[derive(Debug, Copy, Clone, PartialEq, Eq)] @@ -65,14 +68,16 @@ impl<'data> MsgToUserTlv<'data> { return Err(InvalidTlvTypeFieldError { found: tlv_type as u8, expected: Some(TlvType::MsgToUser as u8), - }.into()); + } + .into()); } } TlvTypeField::Custom(raw) => { return Err(InvalidTlvTypeFieldError { found: raw, expected: Some(TlvType::MsgToUser as u8), - }.into()); + } + .into()); } } Ok(msg_to_user) -- 2.43.0