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
This commit is contained in:
parent
bb2a379c59
commit
1665df65da
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue