From 387a53261c5b150fd07bdb9257599dc9fabaf5bf Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 28 Aug 2025 08:07:41 +0200 Subject: [PATCH] Fix cargo clippy issue --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 80a1ebb..54930a8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -137,13 +137,12 @@ async fn main() -> Result<(), Box> { let buff = if !modified_headers { // Check for URL prefix - if let Some(prefix) = &args.prefix { - if !String::from_utf8_lossy(&buf_client[..count]).split_once('\n').map(|l|l.0).unwrap_or("").contains(&format!(" {prefix}")) { + if let Some(prefix) = &args.prefix + && !String::from_utf8_lossy(&buf_client[..count]).split_once('\n').map(|l|l.0).unwrap_or("").contains(&format!(" {prefix}")) { client_write.write_all(b"HTTP/1.1 401 Forbidden\r\n\r\nNot proxifiable.\r\n").await.expect("Failed to respond to client"); client_write.flush().await.expect("Failed to flush response to client!"); return; } - } modified_headers = true; manipulate_headers(&buf_client[..count], &args.upstream_dns)