@@ -39,7 +39,8 @@ pub async fn start(
3939 Request :: SendModelingCmd ( cmd, responder) => {
4040 let ws_msg = WsMsg :: Text (
4141 serde_json:: to_string ( & WebSocketRequest :: ModelingCmdReq ( cmd) )
42- . expect ( "ModelingCmdReq can always be serialized" ) ,
42+ . expect ( "ModelingCmdReq can always be serialized" )
43+ . into ( ) ,
4344 ) ;
4445 let resp = write_to_ws. send ( ws_msg) . await . map_err ( RunCommandError :: WebSocketSend ) ;
4546 // If the send fails, it's because the caller dropped its end, so ignore the
@@ -111,7 +112,8 @@ pub async fn start(
111112 Request :: SendModelingBatch ( batch, responder) => {
112113 let ws_msg = WsMsg :: Text (
113114 serde_json:: to_string ( & WebSocketRequest :: ModelingCmdBatchReq ( batch) )
114- . expect ( "ModelingCmdReq can always be serialized" ) ,
115+ . expect ( "ModelingCmdReq can always be serialized" )
116+ . into ( ) ,
115117 ) ;
116118 let resp = write_to_ws. send ( ws_msg) . await . map_err ( RunCommandError :: WebSocketSend ) ;
117119 // If the send fails, it's because the caller dropped its end, so ignore the
@@ -134,7 +136,7 @@ fn decode_websocket_text(text: &str) -> Result<WebSocketResponse> {
134136/// Find the text in a WebSocket message, if there's any.
135137fn text_from_ws ( msg : WsMsg ) -> Option < String > {
136138 match msg {
137- WsMsg :: Text ( text) => Some ( text) ,
139+ WsMsg :: Text ( text) => Some ( text. to_string ( ) ) ,
138140 _ => None ,
139141 }
140142}
0 commit comments