songy

telegram bot as a songbook
git clone git://git.relim.de/songy.git
Log | Files | Refs | README | LICENSE

commit fee343942691aca9899ce617fba393576bb21771
parent 4641a03cd3c1a5e9a5e209abd5b1ffd50438af46
Author: devnibo <kroekerrobin@gmail.com>
Date:   Wed, 17 Jul 2024 11:09:11 +0200

Fix little issue

Diffstat:
Msrc/main.rs | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -144,8 +144,10 @@ fn main() { if is_reports_path && !user_ids_waiting_for_report.is_empty() { let user_id = msg.from.as_ref().unwrap().id; let mut remove_later: Option<usize> = None; - for (i, id) in user_ids_waiting_for_report.iter_mut().enumerate() { + let mut skip = false; + for (i, id) in user_ids_waiting_for_report.iter().enumerate() { if user_id == *id { + skip = true; if handle_report(&handle_arg) { remove_later = Some(i); } @@ -154,7 +156,9 @@ fn main() { if let Some(id) = remove_later { user_ids_waiting_for_report.swap_remove(id); } - continue; + if skip { + continue; + } } if msg.text.is_some() { handle_res = handle_text_message(&handle_arg);