Skip to content

Commit

Permalink
add default to Publish Packet
Browse files Browse the repository at this point in the history
  • Loading branch information
GunnarMorrigan committed Jan 16, 2024
1 parent d63d775 commit cfe5225
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/packets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ impl MqttRead for ProtocolVersion {
}

/// Quality of service
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum QoS {
#[default]
AtMostOnce = 0,
AtLeastOnce = 1,
ExactlyOnce = 2,
Expand Down
2 changes: 1 addition & 1 deletion src/packets/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use super::{
read_variable_integer, variable_integer_len, write_variable_integer, PacketType, PropertyType, QoS,
};

#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Debug, Default, Clone, PartialEq, Eq)]
pub struct Publish {
/// 3.3.1.1 dup
pub dup: bool,
Expand Down

0 comments on commit cfe5225

Please sign in to comment.