From ee6c24d327d2bd60ec9f0dc5d43389ba0217a30f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 9 Sep 2021 09:28:09 +0300 Subject: [PATCH] Update to tungstenite 0.15 --- Cargo.toml | 6 +++--- src/lib.rs | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4a8380b..b047c29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,8 +21,8 @@ gio-runtime = ["gio", "glib"] async-tls = ["real-async-tls"] async-native-tls = ["async-std-runtime", "real-async-native-tls", "tungstenite/native-tls"] tokio-native-tls = ["tokio-runtime", "real-tokio-native-tls", "real-native-tls", "tungstenite/native-tls"] -tokio-rustls-webpki-roots = ["tokio-runtime", "real-tokio-rustls", "webpki-roots", "tungstenite/rustls-tls"] -tokio-rustls-native-certs = ["tokio-runtime", "real-tokio-rustls", "rustls-native-certs", "tungstenite/rustls-tls"] +tokio-rustls-webpki-roots = ["tokio-runtime", "real-tokio-rustls", "webpki-roots", "tungstenite/__rustls-tls"] +tokio-rustls-native-certs = ["tokio-runtime", "real-tokio-rustls", "rustls-native-certs", "tungstenite/__rustls-tls"] tokio-openssl = ["tokio-runtime", "real-tokio-openssl", "openssl"] verbose-logging = [] @@ -36,7 +36,7 @@ futures-io = { version = "0.3", default-features = false, features = ["std"] } pin-project-lite = "0.2" [dependencies.tungstenite] -version = "0.14.0" +version = "0.15.0" default-features = false [dependencies.async-std] diff --git a/src/lib.rs b/src/lib.rs index 45495b7..4947ac3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -78,7 +78,6 @@ use tungstenite::{ HandshakeError, }, protocol::{Message, Role, WebSocket, WebSocketConfig}, - server, }; #[cfg(feature = "async-std-runtime")] @@ -195,7 +194,7 @@ where C: Callback + Unpin, { let f = handshake::server_handshake(stream, move |allow_std| { - server::accept_hdr_with_config(allow_std, callback, config) + tungstenite::accept_hdr_with_config(allow_std, callback, config) }); f.await.map_err(|e| match e { HandshakeError::Failure(e) => e,