Skip to content

Commit d847f9b

Browse files
committed
Upd code
1 parent afc9da9 commit d847f9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

juniper_axum/tests/ws_test_suite.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl TestApp {
8888
None => Err(anyhow!("No message received")),
8989
Some(Err(e)) => Err(anyhow!("WebSocket error: {e}")),
9090
Some(Ok(Message::Text(json))) => {
91-
let actual: serde_json::Value = serde_json::from_str(json.as_str())
91+
let actual: serde_json::Value = serde_json::from_str(&*json)
9292
.map_err(|e| anyhow!("Cannot deserialize received message: {e}"))?;
9393
if actual != expected {
9494
return Err(anyhow!(
@@ -101,7 +101,7 @@ impl TestApp {
101101
Some(Ok(Message::Close(Some(frame)))) => {
102102
let actual = serde_json::json!({
103103
"code": u16::from(frame.code),
104-
"description": frame.reason,
104+
"description": *frame.reason,
105105
});
106106
if actual != expected {
107107
return Err(anyhow!(

0 commit comments

Comments
 (0)