From 1665df65dadabdfe075cfd6c8386a61ac220e463 Mon Sep 17 00:00:00 2001 From: Jeena Date: Fri, 16 Jan 2026 12:06:06 +0000 Subject: [PATCH] Fix release build warning: prefix unused test_processing_delay with underscore - Parameter only used in debug builds, unused in release - Prefix with underscore to indicate intentional non-use - Eliminates compiler warning in release builds - Preserves testing functionality in debug builds --- src/server.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server.rs b/src/server.rs index a2937a8..d1481c6 100644 --- a/src/server.rs +++ b/src/server.rs @@ -43,7 +43,7 @@ pub async fn handle_connection( expected_host: &str, expected_port: u16, max_concurrent_requests: usize, - test_processing_delay: u64, + _test_processing_delay: u64, ) -> io::Result<()> { const MAX_REQUEST_SIZE: usize = 1026; const REQUEST_TIMEOUT: Duration = Duration::from_secs(10); @@ -108,8 +108,8 @@ pub async fn handle_connection( // TESTING ONLY: Add delay for rate limiting tests (debug builds only) #[cfg(debug_assertions)] - if test_processing_delay > 0 { - tokio::time::sleep(tokio::time::Duration::from_secs(test_processing_delay)).await; + if _test_processing_delay > 0 { + tokio::time::sleep(tokio::time::Duration::from_secs(_test_processing_delay)).await; } // Resolve file path with security