From fdb0708ff5b8a545329e173c59ae8a41ee516666 Mon Sep 17 00:00:00 2001 From: Satya Kwok <119509589+satyakwok@users.noreply.github.com> Date: Tue, 12 May 2026 09:26:34 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20tokio-tungstenite=200.29=20=E2=80=94=20M?= =?UTF-8?q?essage::Text/Ping=20take=20typed=20wrappers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tokio-tungstenite 0.24 → 0.29 bump (#9) merged green because cargo check defaults ran without --all-features, missing the `bft` feature's two callsites: Message::Text(String) → Message::Text(Utf8Bytes) Message::Ping(Vec) → Message::Ping(Bytes) `s.into()` and `Default::default()` cover both. Behaviour identical. --- src/bft.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bft.rs b/src/bft.rs index 167b5e4..7648d52 100644 --- a/src/bft.rs +++ b/src/bft.rs @@ -264,7 +264,7 @@ async fn run_driver( cmd = tx_from_caller.recv() => { match cmd { Some(WriterCmd::Send(s)) => { - if let Err(e) = sink.send(Message::Text(s)).await { + if let Err(e) = sink.send(Message::Text(s.into())).await { tracing_warn(&format!("ws send error: {e}; reconnecting")); break; } @@ -283,7 +283,7 @@ async fn run_driver( tracing_warn(&format!("ws stale > {STALE_TIMEOUT:?}; forcing reconnect")); break; } - if let Err(e) = sink.send(Message::Ping(vec![])).await { + if let Err(e) = sink.send(Message::Ping(Default::default())).await { tracing_warn(&format!("ws ping failed: {e}; reconnecting")); break; }