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

Build error with Tungstenite 0.22.0+ #173

Closed
TechnoPorg opened this issue Jun 5, 2024 · 1 comment · Fixed by #174
Closed

Build error with Tungstenite 0.22.0+ #173

TechnoPorg opened this issue Jun 5, 2024 · 1 comment · Fixed by #174

Comments

@TechnoPorg
Copy link
Contributor

Since snapview/tungstenite-rs@c21281a, support for url::Url in the tungstenite library has become an optional feature that is disabled by default. Since message-io currently relies on tungstenite's default trait implementations for url::Url, this change causes a build error with tungstenite >= v0.22.0:

error[E0277]: the trait bound `url::Url: IntoClientRequest` is not satisfied
   --> /home/USER/.cargo/registry/src/index.crates.io-6f17d22bba15001f/message-io-0.18.1/src/adapters/ws.rs:199:38
    |
199 |                     match ws_connect(url, stream) {
    |                           ---------- ^^^ the trait `IntoClientRequest` is not implemented for `url::Url`
    |                           |
    |                           required by a bound introduced by this call
    |
    = help: the following other types implement trait `IntoClientRequest`:
              httparse::Request<'h, 'b>
              ClientRequestBuilder
              tungstenite::http::Request<()>
              Uri
              std::string::String
              &'a str
              &'a std::string::String
              &'a Uri
note: required by a bound in `client`
   --> /home/USER/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tungstenite-0.23.0/src/client.rs:176:10

The problem can be solved either by limiting tungstenite to versions < 0.22.0, or by requiring a version >= 0.22.0 and explicitly enabling the url feature.

@lemunozm
Copy link
Owner

Released in v0.18.2

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

Successfully merging a pull request may close this issue.

2 participants