Skip to content
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

Breaks with async_tungstenite 0.6.2 #324

Closed
Thoralf-M opened this issue Nov 18, 2021 · 3 comments
Closed

Breaks with async_tungstenite 0.6.2 #324

Thoralf-M opened this issue Nov 18, 2021 · 3 comments

Comments

@Thoralf-M
Copy link
Contributor

error[E0308]: mismatched types
   --> \.cargo\registry\src\github.com-1ecc6299db9ec823\rumqttc-0.10.0\src\eventloop.rs:299:40
    |
299 |             Network::new(WsStream::new(socket), options.max_incoming_packet_size)
    |                                        ^^^^^^ expected struct `async_tungstenite::WebSocketStream`, found struct `WebSocketStream`
    |
    = note: expected struct `async_tungstenite::WebSocketStream<_>`
               found struct `WebSocketStream<async_tungstenite::stream::Stream<TokioAdapter<tokio::net::TcpStream>, TokioAdapter<tokio_rustls::client::TlsStream<tokio::net::TcpStream>>>>`
    = note: perhaps two different versions of crate `async_tungstenite` are being used?

error[E0308]: mismatched types
   --> \.cargo\registry\src\github.com-1ecc6299db9ec823\rumqttc-0.10.0\src\eventloop.rs:316:40
    |
316 |             Network::new(WsStream::new(socket), options.max_incoming_packet_size)
    |                                        ^^^^^^ expected struct `async_tungstenite::WebSocketStream`, found struct `WebSocketStream`
    |
    = note: expected struct `async_tungstenite::WebSocketStream<_>`
               found struct `WebSocketStream<async_tungstenite::stream::Stream<TokioAdapter<tokio::net::TcpStream>, TokioAdapter<tokio_rustls::client::TlsStream<tokio::net::TcpStream>>>>`
    = note: perhaps two different versions of crate `async_tungstenite` are being used?

There is a breaking change from 0.6.1 to 0.6.2, but cargo just uses the later version if not specified otherwise

@jyhi
Copy link

jyhi commented Nov 18, 2021

There is a breaking change from 0.6.1 to 0.6.2

... for ws_stream_tungstenite. A temporary solution could be specifying =0.6.1 for it instead of 0.6.1 (which is equivalent to ~0.6), but it's probably better to follow the upgrade to async_tungstenite v0.16.0 with fixing API breaks.

@jyhi
Copy link

jyhi commented Nov 18, 2021

ws_stream_tungstenite v0.6.2 has been yanked so now rumqttc should compile successfully. Following updates can be based on ws_stream_tungstenite v0.7.0 including the breaking changes mentioned above.

@de-sh
Copy link
Contributor

de-sh commented Feb 10, 2022

#336 upgraded these dependencies, hopefully your problems are solved @Thoralf-M

@de-sh de-sh closed this as completed Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants