Skip to content

Commit

Permalink
Upd code
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Dec 18, 2024
1 parent afc9da9 commit d847f9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions juniper_axum/tests/ws_test_suite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl TestApp {
None => Err(anyhow!("No message received")),
Some(Err(e)) => Err(anyhow!("WebSocket error: {e}")),
Some(Ok(Message::Text(json))) => {
let actual: serde_json::Value = serde_json::from_str(json.as_str())
let actual: serde_json::Value = serde_json::from_str(&*json)
.map_err(|e| anyhow!("Cannot deserialize received message: {e}"))?;
if actual != expected {
return Err(anyhow!(
Expand All @@ -101,7 +101,7 @@ impl TestApp {
Some(Ok(Message::Close(Some(frame)))) => {
let actual = serde_json::json!({
"code": u16::from(frame.code),
"description": frame.reason,
"description": *frame.reason,
});
if actual != expected {
return Err(anyhow!(
Expand Down

0 comments on commit d847f9b

Please sign in to comment.