http: remove redundant redefinition of binding

Fixes the clippy error:

error: redundant redefinition of a binding `data`
   --> proxmox-http/src/websocket/mod.rs:375:9
    |
375 |         let data = data;
    |         ^^^^^^^^^^^^^^^^
    |
help: `data` is initially defined here
   --> proxmox-http/src/websocket/mod.rs:369:27
    |
369 |     pub fn try_from_bytes(data: &[u8]) -> Result<Option<FrameHeader>, WebSocketError> {
    |                           ^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_locals
    = note: `#[deny(clippy::redundant_locals)]` on by default

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
Maximiliano Sandoval 2024-06-26 14:43:40 +02:00 committed by Wolfgang Bumiller
parent 82bc4db723
commit b006e66361

View File

@ -372,8 +372,6 @@ impl FrameHeader {
return Ok(None);
}
let data = data;
// we do not support extensions
if data[0] & 0b01110000 > 0 {
return Err(WebSocketError::new(