Skip to content

Commit

Permalink
maybe this fixes the issue?
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Sep 18, 2023
1 parent a4b1425 commit 2a0db6b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,20 @@ impl TryFrom<u8> for SequenceFlags {

/// Abstraction for the CCSDS Packet ID, which forms the last thirteen bits
/// of the first two bytes in the CCSDS primary header.
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
#[derive(Debug, Eq, Copy, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct PacketId {
pub ptype: PacketType,
pub sec_header_flag: bool,
apid: u16,
}

impl PartialEq for PacketId {
fn eq(&self, other: &Self) -> bool {
self.raw().eq(&other.raw())
}
}

impl PartialOrd for PacketId {
fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {
self.raw().partial_cmp(&other.raw())
Expand Down

0 comments on commit 2a0db6b

Please sign in to comment.