diff --git a/kube-client/src/api/portforward.rs b/kube-client/src/api/portforward.rs index 6439f9dc7..e28ffbc22 100644 --- a/kube-client/src/api/portforward.rs +++ b/kube-client/src/api/portforward.rs @@ -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))