Skip to content

Commit 475bbff

Browse files
authored
Merge pull request #81 from quartiq/feature/property-compare
Deriving PartialEq for properties
2 parents e8a0727 + c565c89 commit 475bbff

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ This document describes the changes to Minimq between releases.
55
# [Unreleased]
66

77
## Added
8+
* Property comparison now implements PartialEq
9+
810
## Fixed
911

1012
# [0.5.2] - 2021-12-14

src/properties.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::{
66

77
use enum_iterator::IntoEnumIterator;
88

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

@@ -47,7 +47,7 @@ pub(crate) enum PropertyIdentifier {
4747
}
4848

4949
/// All of the possible properties that MQTT version 5 supports.
50-
#[derive(Debug, Copy, Clone)]
50+
#[derive(Debug, Copy, Clone, PartialEq)]
5151
pub enum Property<'a> {
5252
PayloadFormatIndicator(u8),
5353
MessageExpiryInterval(u32),

0 commit comments

Comments
 (0)