Update tokio-tungstenite crate from 0.24 to 0.25 version (#1298)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kai Ren <tyranron@gmail.com>
This commit is contained in:
dependabot[bot] 2024-12-16 17:20:51 +01:00 committed by GitHub
parent ee3cb3cc4c
commit 3e01787926
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -43,7 +43,7 @@ futures = "0.3.22"
juniper = { version = "0.16", path = "../juniper", features = ["expose-test-schema"] } juniper = { version = "0.16", path = "../juniper", features = ["expose-test-schema"] }
tokio = { version = "1.20", features = ["macros", "net", "rt-multi-thread", "time"] } tokio = { version = "1.20", features = ["macros", "net", "rt-multi-thread", "time"] }
tokio-stream = "0.1" tokio-stream = "0.1"
tokio-tungstenite = "0.24" tokio-tungstenite = "0.25"
tower-service = "0.3" tower-service = "0.3"
tracing = "0.1" tracing = "0.1"
tracing-subscriber = "0.3" tracing-subscriber = "0.3"

View file

@ -75,7 +75,7 @@ impl TestApp {
) -> Result<(), anyhow::Error> { ) -> Result<(), anyhow::Error> {
match message { match message {
WsIntegrationMessage::Send(msg) => websocket WsIntegrationMessage::Send(msg) => websocket
.send(Message::Text(msg.to_string())) .send(Message::Text(msg.to_string().into()))
.await .await
.map_err(|e| anyhow!("Could not send message: {e}")) .map_err(|e| anyhow!("Could not send message: {e}"))
.map(drop), .map(drop),
@ -88,7 +88,7 @@ impl TestApp {
None => Err(anyhow!("No message received")), None => Err(anyhow!("No message received")),
Some(Err(e)) => Err(anyhow!("WebSocket error: {e}")), Some(Err(e)) => Err(anyhow!("WebSocket error: {e}")),
Some(Ok(Message::Text(json))) => { Some(Ok(Message::Text(json))) => {
let actual: serde_json::Value = serde_json::from_str(&json) let actual: serde_json::Value = serde_json::from_str(json.as_str())
.map_err(|e| anyhow!("Cannot deserialize received message: {e}"))?; .map_err(|e| anyhow!("Cannot deserialize received message: {e}"))?;
if actual != expected { if actual != expected {
return Err(anyhow!( return Err(anyhow!(