async_tungstenite::tokio::ConnectStream doesn't implement Debug when feature "tokio-native-tls" is enabled.
hn-sl opened this issue · 5 comments
Cargo.toml
[dependencies]
async-tungstenite = { version = "0.13.0", features = ["tokio-runtime", "tokio-native-tls"] }
main.rs
use async_tungstenite::tokio::ConnectStream;
#[derive(Debug)]
struct Foo(ConnectStream);
fn main() {
println!("Hello, world!");
}
This produce compile error : error[E0277]: async_tungstenite::stream::Stream<TokioAdapter<tokio::net::tcp::stream::TcpStream>, TokioAdapter<tokio_native_tls::TlsStream<tokio::net::tcp::stream::TcpStream>>>
doesn't implement Debug
I hope this type implements debug.
It might be sufficient to #[derive(Debug)]
in
async-tungstenite/src/stream.rs
Line 12 in 1170f4e
It might also be necessary to implement Debug
for other types then though, including tokio_native_tls::TlsStream
.
Do you want to give it a try?
I just confirmed that adding #[derive(Debug)]
to the Stream in your comment is sufficient.
Great, do you want to submit a PR for that?
Sure I just submitted it.
Thanks :)