Skip to content

Commit

Permalink
Merge pull request #81 from quartiq/feature/property-compare
Browse files Browse the repository at this point in the history
Deriving PartialEq for properties
  • Loading branch information
ryan-summers authored Feb 14, 2022
2 parents e8a0727 + c565c89 commit 475bbff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This document describes the changes to Minimq between releases.
# [Unreleased]

## Added
* Property comparison now implements PartialEq

## Fixed

# [0.5.2] - 2021-12-14
Expand Down
4 changes: 2 additions & 2 deletions src/properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{

use enum_iterator::IntoEnumIterator;

#[derive(Copy, Clone, IntoEnumIterator)]
#[derive(Copy, Clone, PartialEq, IntoEnumIterator)]
pub(crate) enum PropertyIdentifier {
Invalid = -1,

Expand Down Expand Up @@ -47,7 +47,7 @@ pub(crate) enum PropertyIdentifier {
}

/// All of the possible properties that MQTT version 5 supports.
#[derive(Debug, Copy, Clone)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub enum Property<'a> {
PayloadFormatIndicator(u8),
MessageExpiryInterval(u32),
Expand Down

0 comments on commit 475bbff

Please sign in to comment.