File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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 ! (
You can’t perform that action at this time.
0 commit comments