Skip to content

Commit

Permalink
prep v0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Nov 8, 2024
1 parent 2d7ccc0 commit 453645b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- 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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <muellerr@irs.uni-stuttgart.de>"]
Expand Down
4 changes: 3 additions & 1 deletion src/cfdp/pdu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 8 additions & 3 deletions src/cfdp/tlv/msg_to_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 453645b

Please sign in to comment.