summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2024-04-04 12:40:25 +0200
committerMatthias Beyer <mail@beyermatthias.de>2024-04-04 12:44:14 +0200
commit27383d7bf83e956de960da5c8cad3771f5a9d5c7 (patch)
treeec9456b4642f08fbb77a8267b3f9db27f4691ae4
parentccd287c0ba7c6760711856347dfdb838a2926029 (diff)
Fix: PacketIdentifierNonZero can now be converted to PacketIdentifier
Because the PacketIdentifier from mqtt-format holds a NonZeroU16 now, this conversion is now possible. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--src/client/send.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/send.rs b/src/client/send.rs
index 91f9564..855a389 100644
--- a/src/client/send.rs
+++ b/src/client/send.rs
@@ -68,7 +68,7 @@ impl MqttClient {
retain,
topic_name: topic.as_ref(),
packet_identifier: packet_identifier
- .map(|nz| mqtt_format::v5::variable_header::PacketIdentifier(nz.get())),
+ .map(mqtt_format::v5::variable_header::PacketIdentifier::from),
properties: mqtt_format::v5::packets::publish::PublishProperties::new(),
payload: payload.as_ref(),
};