Skip to content

Commit

Permalink
Update tokio-tungstenite requirement from 0.24.0 to 0.25.0 (#1666)
Browse files Browse the repository at this point in the history
* Update tokio-tungstenite requirement from 0.24.0 to 0.25.0

Updates the requirements on [tokio-tungstenite](https://github.com/snapview/tokio-tungstenite) to permit the latest version.
- [Changelog](https://github.com/snapview/tokio-tungstenite/blob/master/CHANGELOG.md)
- [Commits](snapview/tokio-tungstenite@v0.24.0...v0.24.0)

---
updated-dependencies:
- dependency-name: tokio-tungstenite
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* add some into calls to fix upgrade

Signed-off-by: clux <[email protected]>

* fix clippy lint on useless from

Signed-off-by: clux <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: clux <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: clux <[email protected]>
  • Loading branch information
dependabot[bot] and clux authored Dec 23, 2024
1 parent 000e99a commit 68a46a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ tempfile = "3.1.0"
thiserror = "2.0.3"
tokio = "1.14.0"
tokio-test = "0.4.0"
tokio-tungstenite = "0.24.0"
tokio-tungstenite = "0.26.1"
tokio-util = "0.7.0"
tower = "0.5.1"
tower-http = "0.6.1"
Expand Down
3 changes: 1 addition & 2 deletions kube-client/src/api/portforward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ where
.map_err(Error::ReceiveWebSocketMessage)?
{
match msg {
ws::Message::Binary(bin) if bin.len() > 1 => {
let mut bytes = Bytes::from(bin);
ws::Message::Binary(mut bytes) if bytes.len() > 1 => {
let ch = bytes.split_to(1)[0];
sender
.send(Message::FromPod(ch, bytes))
Expand Down
8 changes: 4 additions & 4 deletions kube-client/src/api/remote_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ where
let mut vec = Vec::with_capacity(new_size.len() + 1);
vec.push(RESIZE_CHANNEL);
vec.extend_from_slice(&new_size[..]);
server_send.send(ws::Message::Binary(vec)).await.map_err(Error::SendTerminalSize)?;
server_send.send(ws::Message::Binary(vec.into())).await.map_err(Error::SendTerminalSize)?;
},
None => {
have_terminal_size_rx = false;
Expand Down Expand Up @@ -379,9 +379,9 @@ async fn filter_message(wsm: Result<ws::Message, ws::Error>) -> Option<Result<Me
// The protocol only sends binary frames.
// Message of size 1 (only channel number) is sent on connection.
Ok(ws::Message::Binary(bin)) if bin.len() > 1 => match bin[0] {
STDOUT_CHANNEL => Some(Ok(Message::Stdout(bin))),
STDERR_CHANNEL => Some(Ok(Message::Stderr(bin))),
STATUS_CHANNEL => Some(Ok(Message::Status(bin))),
STDOUT_CHANNEL => Some(Ok(Message::Stdout(bin.into()))),
STDERR_CHANNEL => Some(Ok(Message::Stderr(bin.into()))),
STATUS_CHANNEL => Some(Ok(Message::Status(bin.into()))),
// We don't receive messages to stdin and resize channels.
_ => None,
},
Expand Down

0 comments on commit 68a46a4

Please sign in to comment.