From 47e085a969c3b885e8c22294e3693647a05ad67b Mon Sep 17 00:00:00 2001 From: Enrico Risa Date: Fri, 6 Oct 2023 22:25:11 +0200 Subject: [PATCH] chore: update tungstenite --- gremlin-client/Cargo.toml | 2 +- gremlin-client/src/aio/connection.rs | 15 --------------- gremlin-client/src/error.rs | 2 +- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/gremlin-client/Cargo.toml b/gremlin-client/Cargo.toml index 5ebd101f..eda2c516 100644 --- a/gremlin-client/Cargo.toml +++ b/gremlin-client/Cargo.toml @@ -43,7 +43,7 @@ chrono = { version = "0.4", default-features = false} lazy_static = "1.3.0" base64 = "0.21.4" native-tls = "0.2.3" -tungstenite = { version = "0.18.0", features = ["native-tls"] } +tungstenite = { version = "0.20.1", features = ["native-tls"] } async-tungstenite = { version = "0.23", optional = true, default-features=false} async-std = { version = "1.4.0", optional = true, features = ["unstable","attributes"] } async-trait = { version = "0.1.10", optional = true } diff --git a/gremlin-client/src/aio/connection.rs b/gremlin-client/src/aio/connection.rs index a18d395e..0e74e264 100644 --- a/gremlin-client/src/aio/connection.rs +++ b/gremlin-client/src/aio/connection.rs @@ -115,21 +115,6 @@ mod tls { } } -impl From for async_tungstenite::tungstenite::protocol::WebSocketConfig { - fn from(value: WebSocketOptions) -> Self { - (&value).into() - } -} - -impl From<&WebSocketOptions> for async_tungstenite::tungstenite::protocol::WebSocketConfig { - fn from(value: &WebSocketOptions) -> Self { - let mut config = async_tungstenite::tungstenite::protocol::WebSocketConfig::default(); - config.max_message_size = value.max_message_size; - config.max_frame_size = value.max_frame_size; - config - } -} - #[cfg(feature = "tokio-runtime")] mod tls { diff --git a/gremlin-client/src/error.rs b/gremlin-client/src/error.rs index 8d0d72c8..f762847e 100644 --- a/gremlin-client/src/error.rs +++ b/gremlin-client/src/error.rs @@ -12,7 +12,7 @@ pub enum GremlinError { Generic(String), #[error(transparent)] - WebSocket(#[from] tungstenite::error::Error), + WebSocket(tungstenite::error::Error), #[error(transparent)] Pool(#[from] r2d2::Error),