Skip to content

Fix tokio-tungstenite 0.28.0 API compatibility#1066

Merged
jtran merged 2 commits intodependabot/cargo/tokio-tungstenite-0.28.0from
copilot/fix-build-after-crate-bump
Feb 1, 2026
Merged

Fix tokio-tungstenite 0.28.0 API compatibility#1066
jtran merged 2 commits intodependabot/cargo/tokio-tungstenite-0.28.0from
copilot/fix-build-after-crate-bump

Conversation

Copy link

Copilot AI commented Feb 1, 2026

The tokio-tungstenite 0.28.0 upgrade (PR #1054) changed WsMsg::Text from accepting String to Utf8Bytes.

Changes

Updated modeling-session/src/actor.rs to handle the new type:

  • Outgoing messages: Added .into() conversion from String to Utf8Bytes when constructing WsMsg::Text
  • Incoming messages: Changed text extraction to use .to_string() to convert Utf8Bytes to String
// Before
let ws_msg = WsMsg::Text(
    serde_json::to_string(&request).expect("..."),
);

// After
let ws_msg = WsMsg::Text(
    serde_json::to_string(&request).expect("...").into(),
);
// Before
WsMsg::Text(text) => Some(text),

// After
WsMsg::Text(text) => Some(text.to_string()),
Original prompt

Pull Request: #1054

Make a new PR that fixes the build, preserving the same functionality as before the crate bump.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: jtran <10803+jtran@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix build issues after crate bump while preserving functionality Fix tokio-tungstenite 0.28.0 API compatibility Feb 1, 2026
Copilot AI requested a review from jtran February 1, 2026 02:19
@codecov
Copy link

codecov bot commented Feb 1, 2026

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (dependabot/cargo/tokio-tungstenite-0.28.0@88d2689). Learn more about missing BASE report.

Files with missing lines Patch % Lines
modeling-session/src/actor.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@                             Coverage Diff                              @@
##             dependabot/cargo/tokio-tungstenite-0.28.0    #1066   +/-   ##
============================================================================
  Coverage                                             ?   29.24%           
============================================================================
  Files                                                ?       35           
  Lines                                                ?     1737           
  Branches                                             ?        0           
============================================================================
  Hits                                                 ?      508           
  Misses                                               ?     1229           
  Partials                                             ?        0           
Flag Coverage Δ
unittests 29.24% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jtran jtran marked this pull request as ready for review February 1, 2026 14:23
@jtran jtran merged commit 0d98e57 into dependabot/cargo/tokio-tungstenite-0.28.0 Feb 1, 2026
10 checks passed
@jtran jtran deleted the copilot/fix-build-after-crate-bump branch February 1, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants