[pbs-devel] [PATCH proxmox 12/18] http: remove redundant redefinition of binding

Maximiliano Sandoval m.sandoval at proxmox.com
Wed Jun 26 12:45:08 CEST 2024


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 at proxmox.com>
---
 proxmox-http/src/websocket/mod.rs | 2 --
 1 file changed, 2 deletions(-)

diff --git a/proxmox-http/src/websocket/mod.rs b/proxmox-http/src/websocket/mod.rs
index 2efc06ae..b3179e1f 100644
--- a/proxmox-http/src/websocket/mod.rs
+++ b/proxmox-http/src/websocket/mod.rs
@@ -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(
-- 
2.39.2





More information about the pbs-devel mailing list