-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependencies: Bump async-channel to v2.0.0 #227
Comments
I haven't looked at the async channels past 2.0. But I've started refactoring the options and data structs to be more Rust-y. Get rid of the FFI and self-referential pinning in the structs that the apps use, and convert them to FFI data in the call that sends them down to the C lib. The goal is to make the library's API fully Rust and then eventually replace the internal implementation with 100% Rust, removing the dependency on the C library. With the amount of free time I have, that may take a while, but it's the goal. Anyway, the initial conversion of the structs may help make them easier to pass through the channels. If that's the problem here. |
Well, actually the solution is far simpler: diff --git a/examples/async_subscribe.rs b/examples/async_subscribe.rs
index a3d5050..13712bd 100644
--- a/examples/async_subscribe.rs
+++ b/examples/async_subscribe.rs
@@ -71,7 +71,7 @@ fn main() {
if let Err(err) = block_on(async {
// Get message stream before connecting.
- let mut strm = cli.get_stream(25);
+ let mut strm = std::pin::pin!(cli.get_stream(25));
// Define the set of options for the connection
let lwt = mqtt::Message::new(
diff --git a/examples/async_subscribe_v5.rs b/examples/async_subscribe_v5.rs
index 295c0eb..99e30ac 100644
--- a/examples/async_subscribe_v5.rs
+++ b/examples/async_subscribe_v5.rs
@@ -73,7 +73,7 @@ fn main() {
if let Err(err) = block_on(async {
// Get message stream before connecting.
- let mut strm = cli.get_stream(25);
+ let mut strm = std::pin::pin!(cli.get_stream(25));
// Define the set of options for the connection
let lwt = mqtt::Message::new( AsyncChannel now is The motivation behind this change is to reduce compile times, dependencies and so on because async-channel gets duplicated with multiple versions when paired with crates like |
OK. I'll have a look at that. I'll probably maintain parallel paths of the bigger (slowly evolving) changes, and keeping the mainline up to date. |
I am interested in this update as well. |
Changelog: https://github.com/smol-rs/async-channel/blob/master/CHANGELOG.md#version-200
Bumping the dependency manually causes the following errors:
The text was updated successfully, but these errors were encountered: