File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
cloudevents-sdk-paho-mqtt Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ description = "CloudEvents official Rust SDK - Mqtt integration"
1111[dependencies ]
1212cloudevents-sdk = { version = " 0.3.0" , path = " .." }
1313lazy_static = " 1.4.0"
14- paho-mqtt = " 0.8 "
14+ paho-mqtt = " 0.9.1 "
1515chrono = { version = " ^0.4" , features = [" serde" ] }
1616
1717[dev-dependencies ]
Original file line number Diff line number Diff line change 1- //! This library provides Mqtt protocol bindings for CloudEvents
2- //! using the [paho.mqtt.rust](https://github.com/eclipse/paho.mqtt.rust) library.\\
1+ //! This library provides Mqtt protocol bindings for CloudEvents using the [paho.mqtt.rust](https://github.com/eclipse/paho.mqtt.rust) library.\\
32#[ macro_use]
43mod headers;
54mod mqtt_consumer_record;
Original file line number Diff line number Diff line change @@ -135,13 +135,15 @@ impl MessageBuilderExt for MessageBuilder {
135135
136136 match version {
137137 MQTT_5 => {
138- self = self . properties ( message_record. headers . clone ( ) ) ;
138+ self = self . properties ( message_record. headers ) ;
139139 }
140140 _ => ( ) ,
141141 }
142142
143- if let Some ( s) = message_record. payload . as_ref ( ) {
144- self = self . payload ( s. to_vec ( ) ) ;
143+ match message_record. payload {
144+ Some ( s) =>
145+ self = self . payload ( s) ,
146+ None => ( )
145147 }
146148
147149 self
You can’t perform that action at this time.
0 commit comments