diff --git a/proxmox-http/src/client/simple.rs b/proxmox-http/src/client/simple.rs index 4d04d7e9..b58dc0f0 100644 --- a/proxmox-http/src/client/simple.rs +++ b/proxmox-http/src/client/simple.rs @@ -83,8 +83,8 @@ impl SimpleHttp { } pub async fn request(&self, mut request: Request) -> Result, Error> { - let user_agent = if let Some(ref user_agent) = self.options.user_agent { - HeaderValue::from_str(&user_agent)? + let user_agent = if let Some(user_agent) = &self.options.user_agent { + HeaderValue::from_str(user_agent)? } else { HeaderValue::from_str(Self::DEFAULT_USER_AGENT_STRING)? }; diff --git a/proxmox-http/src/websocket/mod.rs b/proxmox-http/src/websocket/mod.rs index 2de15640..824dc45c 100644 --- a/proxmox-http/src/websocket/mod.rs +++ b/proxmox-http/src/websocket/mod.rs @@ -609,13 +609,12 @@ impl AsyncRead for WebSocketReader { ReaderState::HaveData }; this.read_buffer = Some(read_buffer); - continue; } else { this.header = Some(header); this.read_buffer = Some(read_buffer); this.state = ReaderState::NoData; - continue; } + continue; } let len = min(buf.remaining(), min(header.payload_len, read_buffer.len()));