diff --git a/src/httplib.rs b/src/httplib.rs index 7756dda..75b5041 100644 --- a/src/httplib.rs +++ b/src/httplib.rs @@ -47,8 +47,7 @@ pub async fn return_http_data(options: &LibOptions) -> HashMap async move { if options.retries > 1 { - let mut counter = 0; - while counter < options.retries { + for _ in 0..options.retries { if let Some(resp) = https_send_fut.try_clone() { if let Ok(resp) = resp.send().await { response = Some(resp); @@ -59,7 +58,6 @@ pub async fn return_http_data(options: &LibOptions) -> HashMap response = Some(resp); break; } - counter += 1; } } } else if let Ok(resp) = https_send_fut.send().await {