Skip to content

Broken websocket feature in rumqttc 0.25 #1003

@Show-vars

Description

@Show-vars

I can't compile a fresh project with only one dependency of rumqttc = "0.25.0". Seems that the problem is related to ws_stream_tungstenite v0.14.0. There a new version 0.15.0 which compiles without any errors.

   Compiling ws_stream_tungstenite v0.14.0
error[E0277]: the trait bound `WebSocketStream<S>: futures_sink::Sink<Message>` is not satisfied
   --> /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ws_stream_tungstenite-0.14.0/src/tung_websocket.rs:145:53
    |
145 |         if ready!( Pin::new( &mut self.closer ).run( &mut self.inner, &mut self.notifier, cx) ).is_err()
    |                                                 ---       ^^^^^^^^^^ the trait `futures_sink::Sink<Message>` is not implemented for `WebSocketStream<S>`
    |                                                 |
    |                                                 required by a bound introduced by this call
    |
    = help: the following other types implement trait `futures_sink::Sink<Item>`:
              `&futures_channel::mpsc::UnboundedSender<T>` implements `futures_sink::Sink<T>`
              `&mut S` implements `futures_sink::Sink<Item>`
              `Box<S>` implements `futures_sink::Sink<Item>`
              `Buffer<Si, Item>` implements `futures_sink::Sink<Item>`
              `BufferUnordered<S>` implements `futures_sink::Sink<Item>`
              `Buffered<S>` implements `futures_sink::Sink<Item>`
              `Either<A, B>` implements `futures_sink::Sink<Item>`
              `Fanout<Si1, Si2>` implements `futures_sink::Sink<Item>`
            and 60 others
error[E0599]: no method named `poll_ready` found for struct `std::pin::Pin<&mut WebSocketStream<S>>` in the current scope
   --> /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ws_stream_tungstenite-0.14.0/src/tung_websocket.rs:417:31
    |
417 |         Pin::new( &mut self.inner ).poll_ready( cx ).map_err( |e|
    |                                     ^^^^^^^^^^ method not found in `std::pin::Pin<&mut WebSocketStream<S>>`

error[E0599]: no method named `start_send` found for struct `std::pin::Pin<&mut WebSocketStream<S>>` in the current scope
   --> /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ws_stream_tungstenite-0.14.0/src/tung_websocket.rs:453:31
    |
453 |         Pin::new( &mut self.inner ).start_send( item.into() ).map_err( |e|
    |                                     ^^^^^^^^^^ method not found in `std::pin::Pin<&mut WebSocketStream<S>>`

error[E0599]: no method named `poll_flush` found for struct `std::pin::Pin<&mut WebSocketStream<S>>` in the current scope
   --> /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ws_stream_tungstenite-0.14.0/src/tung_websocket.rs:468:31
    |
468 |         Pin::new( &mut self.inner ).poll_flush( cx ).map_err( |e|
    |                                     ^^^^^^^^^^ method not found in `std::pin::Pin<&mut WebSocketStream<S>>`

error[E0599]: no method named `poll_close` found for struct `std::pin::Pin<&mut WebSocketStream<S>>` in the current scope
   --> /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ws_stream_tungstenite-0.14.0/src/tung_websocket.rs:494:31
    |
494 |         Pin::new( &mut self.inner ).poll_close( cx ).map_err( |e|
    |                                     ^^^^^^^^^^
    |
help: there is a method `close` with a similar name
    |
494 -         Pin::new( &mut self.inner ).poll_close( cx ).map_err( |e|
494 +         Pin::new( &mut self.inner ).close( cx ).map_err( |e|
    |

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions