Skip to content

Commit 4ea6025

Browse files
Bump tokio-tungstenite from 0.24.0 to 0.28.0 (#1054)
1 parent f39e611 commit 4ea6025

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

Cargo.lock

Lines changed: 6 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modeling-session/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ reqwest = "0.12.15"
1919
serde_json = "1.0.149"
2020
thiserror = "2.0.18"
2121
tokio = { version = "1", features = ["sync"] }
22-
tokio-tungstenite = "0.24.0"
22+
tokio-tungstenite = "0.28.0"
2323
uuid = { version = "1.19.0", features = ["v4"] }
2424

2525
[dev-dependencies]

modeling-session/src/actor.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
135137
fn 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

Comments
 (0)