diff --git a/crates/example-tests/Cargo.toml b/crates/example-tests/Cargo.toml index d8c64e4d7be..1d900dd86a3 100644 --- a/crates/example-tests/Cargo.toml +++ b/crates/example-tests/Cargo.toml @@ -21,6 +21,6 @@ mozrunner = "0.15" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" tokio = { version = "1.29.1", features = ["macros", "net", "time"] } -tokio-tungstenite = "0.24" +tokio-tungstenite = "0.25" tower = { version = "0.5", features = ["make", "util"] } tower-http = { version = "0.6", features = ["fs", "util", "set-header"] } diff --git a/crates/example-tests/src/lib.rs b/crates/example-tests/src/lib.rs index 6464941929a..e209e791819 100644 --- a/crates/example-tests/src/lib.rs +++ b/crates/example-tests/src/lib.rs @@ -203,7 +203,7 @@ impl WebDriver { self.next_id += 1; let json = serde_json::to_string(&BidiCommand { id, method, params }) .context("failed to serialize message")?; - self.ws.send(Message::Text(json)).await?; + self.ws.send(Message::Text(json.into())).await?; loop { let msg = self .ws @@ -211,7 +211,7 @@ impl WebDriver { .await .unwrap_or(Err(tungstenite::Error::AlreadyClosed))?; - let message: BidiMessage = serde_json::from_str(&msg.into_text()?)?; + let message: BidiMessage = serde_json::from_str(msg.to_text()?)?; match message { BidiMessage::CommandResponse { id: response_id, @@ -237,7 +237,7 @@ impl WebDriver { .await .unwrap_or(Err(tungstenite::Error::AlreadyClosed))?; - let message: BidiMessage = serde_json::from_str(&msg.into_text()?)?; + let message: BidiMessage = serde_json::from_str(msg.to_text()?)?; match message { BidiMessage::CommandResponse { .. } => bail!("unexpected command response"), BidiMessage::Event(event) => Ok(event),