Skip to content

Commit

Permalink
add some into calls to fix upgrade
Browse files Browse the repository at this point in the history
Signed-off-by: clux <[email protected]>
  • Loading branch information
clux committed Dec 23, 2024
1 parent 69882df commit 73ca510
Showing 1 changed file with 4 additions and 4 deletions.
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)?;

Check warning on line 353 in kube-client/src/api/remote_command.rs

View check run for this annotation

Codecov / codecov/patch

kube-client/src/api/remote_command.rs#L353

Added line #L353 was not covered by tests
},
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()))),

Check warning on line 383 in kube-client/src/api/remote_command.rs

View check run for this annotation

Codecov / codecov/patch

kube-client/src/api/remote_command.rs#L383

Added line #L383 was not covered by tests
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 73ca510

Please sign in to comment.