Skip to content

Commit

Permalink
Bump tokio-tungstenite from v0.24 to v0.25 (#4357)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Dec 16, 2024
1 parent 69607f6 commit 08a4060
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/example-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
6 changes: 3 additions & 3 deletions crates/example-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,15 @@ 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
.next()
.await
.unwrap_or(Err(tungstenite::Error::AlreadyClosed))?;

let message: BidiMessage<R> = serde_json::from_str(&msg.into_text()?)?;
let message: BidiMessage<R> = serde_json::from_str(msg.to_text()?)?;
match message {
BidiMessage::CommandResponse {
id: response_id,
Expand All @@ -237,7 +237,7 @@ impl WebDriver {
.await
.unwrap_or(Err(tungstenite::Error::AlreadyClosed))?;

let message: BidiMessage<Value> = serde_json::from_str(&msg.into_text()?)?;
let message: BidiMessage<Value> = serde_json::from_str(msg.to_text()?)?;
match message {
BidiMessage::CommandResponse { .. } => bail!("unexpected command response"),
BidiMessage::Event(event) => Ok(event),
Expand Down

0 comments on commit 08a4060

Please sign in to comment.