From b105c1aa8870706f15409f3abb851150e1d8188f Mon Sep 17 00:00:00 2001 From: phoenix Date: Sun, 7 Jun 2026 15:57:56 -0400 Subject: [PATCH] Fixing warnings --- src/messaging/mod.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/messaging/mod.rs b/src/messaging/mod.rs index 418cdd4..f8b46ed 100644 --- a/src/messaging/mod.rs +++ b/src/messaging/mod.rs @@ -9,9 +9,8 @@ pub async fn send_messages( second_interval: u64, ) { let long_sleep_limit: i64 = 5; - let mut count: i64 = 0; - for contact in contacts.iter() { + for (text_count, contact) in (0_i64..).zip(contacts.iter()) { println!("Sending to: {:?}", contact.phone_number); let param = swoosh::twilio::types::Parameters { schedule: false, @@ -28,7 +27,7 @@ pub async fn send_messages( } } - if count % long_sleep_limit == 0 { + if text_count % long_sleep_limit == 0 { // Sleep for X seconds let wait_time = second_interval; std::thread::sleep(std::time::Duration::from_secs(wait_time)); @@ -36,8 +35,6 @@ pub async fn send_messages( // Sleep for a second std::thread::sleep(std::time::Duration::from_secs(1)); } - - count += 1; } }