Skip to content

Commit aa73993

Browse files
committed
Merge branch 'develop'
2 parents ee4550b + 244e088 commit aa73993

File tree

7 files changed

+49
-28
lines changed

7 files changed

+49
-28
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ All notable changes to this project will be documented in this file.
77

88
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
99

10+
## [v0.13.4](https://github.com/eclipse/paho.mqtt.rust/compare/v0.13.3..v0.13.4) - (2025-09-02)
11+
12+
- Fixed some elided lifetime warnings
13+
- Bumped depedencies:
14+
- thiserror to v2.0
15+
- toml to v0.9
16+
- [#227](https://github.com/eclipse-paho/paho.mqtt.rust/issues/227) Bump async-channel to v2
17+
- [#248](https://github.com/eclipse-paho/paho.mqtt.rust/pull/248) Imlement binary password support
18+
19+
1020
## [v0.13.3](https://github.com/eclipse/paho.mqtt.rust/compare/v0.13.2..v0.13.3) - (2025-04-28)
1121

1222
- `TopicMatcher` implements `From(HashMap)` for the value type.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "paho-mqtt"
3-
version = "0.13.3"
3+
version = "0.13.4"
44
edition = "2021"
55
rust-version = "1.73"
66
authors = ["Frank Pagliughi <[email protected]>"]
@@ -26,14 +26,14 @@ paho-mqtt-sys = { version = "0.10", path = "paho-mqtt-sys", default-features=fal
2626
libc = "0.2"
2727
futures = "0.3"
2828
futures-timer = "3.0"
29-
async-channel = "1.6"
29+
async-channel = "2.3"
3030
crossbeam-channel = "0.5"
3131
log = "0.4"
32-
thiserror = "1.0"
32+
thiserror = "2.0"
3333

3434
[dev-dependencies]
3535
env_logger = "0.11"
36-
toml = "0.8"
36+
toml = "0.9"
3737
serde = "1.0"
3838
serde_json = "1.0"
3939
lazy_static = "1.4"

examples/async_subscribe.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
//! broker to emit the LWT message.
2222
2323
/*******************************************************************************
24-
* Copyright (c) 2017-2023 Frank Pagliughi <[email protected]>
24+
* Copyright (c) 2017-2025 Frank Pagliughi <[email protected]>
2525
*
2626
* All rights reserved. This program and the accompanying materials
2727
* are made available under the terms of the Eclipse Public License v2.0
@@ -36,7 +36,7 @@
3636
* Frank Pagliughi - initial implementation and documentation
3737
*******************************************************************************/
3838

39-
use futures::{executor::block_on, stream::StreamExt};
39+
use futures::executor::block_on;
4040
use paho_mqtt as mqtt;
4141
use std::{env, process, time::Duration};
4242

@@ -71,7 +71,7 @@ fn main() {
7171

7272
if let Err(err) = block_on(async {
7373
// Get message stream before connecting.
74-
let mut strm = cli.get_stream(25);
74+
let strm = cli.get_stream(25);
7575

7676
// Define the set of options for the connection
7777
let lwt = mqtt::Message::new(
@@ -103,7 +103,7 @@ fn main() {
103103
// whatever) the server will get an unexpected drop and then
104104
// should emit the LWT message.
105105

106-
while let Some(msg_opt) = strm.next().await {
106+
while let Ok(msg_opt) = strm.recv().await {
107107
if let Some(msg) = msg_opt {
108108
println!("{}", msg);
109109
}

examples/async_subscribe_v5.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//! broker to emit the LWT message.
2424
2525
/*******************************************************************************
26-
* Copyright (c) 2017-2023 Frank Pagliughi <[email protected]>
26+
* Copyright (c) 2017-2025 Frank Pagliughi <[email protected]>
2727
*
2828
* All rights reserved. This program and the accompanying materials
2929
* are made available under the terms of the Eclipse Public License v2.0
@@ -38,7 +38,7 @@
3838
* Frank Pagliughi - initial implementation and documentation
3939
*******************************************************************************/
4040

41-
use futures::{executor::block_on, stream::StreamExt};
41+
use futures::executor::block_on;
4242
use paho_mqtt::{self as mqtt, MQTT_VERSION_5};
4343
use std::{env, process, time::Duration};
4444

@@ -79,7 +79,7 @@ fn main() {
7979

8080
if let Err(err) = block_on(async {
8181
// Get message stream before connecting.
82-
let mut strm = cli.get_stream(25);
82+
let strm = cli.get_stream(25);
8383

8484
// Define the set of options for the connection
8585
let lwt = mqtt::Message::new(
@@ -114,7 +114,7 @@ fn main() {
114114
// whatever) the server will get an unexpected drop and then
115115
// should emit the LWT message.
116116

117-
while let Some(msg_opt) = strm.next().await {
117+
while let Ok(msg_opt) = strm.recv().await {
118118
if let Some(msg) = msg_opt {
119119
if msg.retained() {
120120
print!("(R) ");

src/lib.rs

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,28 @@
8282
extern crate log;
8383
extern crate paho_mqtt_sys as ffi;
8484

85+
/// Re-export async_channel
8586
pub use async_channel::Receiver as AsyncReceiver;
86-
pub use crossbeam_channel::Receiver;
8787

88-
pub use crate::async_client::*; //{AsyncClient, AsyncClientBuilder};
89-
pub use crate::client::*; //{Client, ClientBuilder};
88+
/// Re-export crossbeam channel as sync components
89+
pub use crossbeam_channel::{self as sync_channel, Receiver};
90+
91+
/// The asynchronous API
92+
pub mod async_client;
93+
pub use crate::async_client::{
94+
AsyncClient,
95+
//AsyncClientBuilder,
96+
ConnectedCallback,
97+
ConnectionLostCallback,
98+
DisconnectedCallback,
99+
MessageArrivedCallback,
100+
//SslErrorCallback,
101+
};
102+
103+
/// The synchronous API
104+
pub mod client;
105+
pub use crate::client::Client; //ClientBuilder};
106+
90107
pub use crate::client_persistence::*;
91108
pub use crate::connect_options::*; //{ConnectOptions, ConnectOptionsBuilder, MQTT_VERSION_3_1_1, ...};
92109
pub use crate::create_options::*; //{CreateOptions, CreateOptionsBuilder};
@@ -110,12 +127,6 @@ use std::{any::Any, os::raw::c_int};
110127

111128
mod macros;
112129

113-
/// The asynchronous API
114-
pub mod async_client;
115-
116-
/// The synchronous API
117-
pub mod client;
118-
119130
/// Client creation options
120131
pub mod create_options;
121132

src/properties.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77

88
/*******************************************************************************
9-
* Copyright (c) 2019-2020 Frank Pagliughi <[email protected]>
9+
* Copyright (c) 2019-2025 Frank Pagliughi <[email protected]>
1010
*
1111
* All rights reserved. This program and the accompanying materials
1212
* are made available under the terms of the Eclipse Public License v2.0
@@ -976,7 +976,7 @@ impl Properties {
976976
}
977977

978978
/// Gets an iterator for a property instance
979-
pub fn iter(&self, code: PropertyCode) -> PropertyIterator {
979+
pub fn iter(&self, code: PropertyCode) -> PropertyIterator<'_> {
980980
PropertyIterator {
981981
props: self,
982982
code,
@@ -1044,7 +1044,7 @@ impl Properties {
10441044
}
10451045

10461046
/// Gets an iterator into the user property string pairs.
1047-
pub fn user_iter(&self) -> StringPairIterator {
1047+
pub fn user_iter(&self) -> StringPairIterator<'_> {
10481048
StringPairIterator {
10491049
props: self,
10501050
code: PropertyCode::UserProperty,

src/topic_matcher.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl<T> Node<T> {
105105
}
106106

107107
/// Gets an iterator for the node and _all_ of its children.
108-
fn iter(&self) -> NodeIter<T> {
108+
fn iter(&self) -> NodeIter<'_, T> {
109109
Box::new(
110110
self.value
111111
.iter()
@@ -115,7 +115,7 @@ impl<T> Node<T> {
115115
}
116116

117117
/// Gets a mutable iterator for the node and _all_ of its children.
118-
fn iter_mut(&mut self) -> NodeIterMut<T> {
118+
fn iter_mut(&mut self) -> NodeIterMut<'_, T> {
119119
Box::new(
120120
self.value
121121
.iter_mut()
@@ -310,12 +310,12 @@ impl<T> TopicMatcher<T> {
310310
}
311311

312312
/// Gets an iterator over all the items in the collection.
313-
pub fn iter(&self) -> NodeIter<T> {
313+
pub fn iter(&self) -> NodeIter<'_, T> {
314314
self.root.iter()
315315
}
316316

317317
/// Gets a muable iterator over all the items in the collection.
318-
pub fn iter_mut(&mut self) -> NodeIterMut<T> {
318+
pub fn iter_mut(&mut self) -> NodeIterMut<'_, T> {
319319
self.root.iter_mut()
320320
}
321321

0 commit comments

Comments
 (0)