Closed bartnv closed 1 year ago
Thank you for the report. I'm recovering from the holidays today. But I'll take a look at this tomorrow. I'm sure we'll find a solution.
I published 0.5.2 with better tokio helpers and a warp example. You could have used TryStreamExt::map_ok with .compat()
, but I think it makes sense to provide nice helper methods and types for tokio.
Does this work for you?
This works great, thanks a lot! Indeed nice to have these helper methods for commonly used libraries.
First of all: thank you for this nice library with a well though-out interface. I would really like to use it within a project using the tokio-based warp library (https://docs.rs/warp/). The problem I run into is that this library only supports running on a stream of incoming connections (https://docs.rs/warp/latest/warp/struct.Server.html#method.run_incoming) with trait bounds for tokio::io::{AsyncRead,AsyncWrite}. I can't use a custom acceptor like in the high_level_tokio example to run the compat() method, so I'm stuck for now.
Example of the code I have so far:
This fails to compile with:
If I change the last line to:
I get:
I'm not sure this can be solved reasonably within this library, but wanted to reach out just in case. Superficially it seems to me to be similar to the problem that came up with axum (https://github.com/FlorianUekermann/rustls-acme/issues/27), but it might be more complicated.