From 9e7b2af480a5ae5b44966624689b5d98245c9073 Mon Sep 17 00:00:00 2001 From: Bastian Gruber Date: Mon, 22 May 2023 10:40:33 +0200 Subject: [PATCH] Move logic around to find bug --- problem_06/src/ticketing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problem_06/src/ticketing.rs b/problem_06/src/ticketing.rs index 9c5c4a9..9abafe3 100644 --- a/problem_06/src/ticketing.rs +++ b/problem_06/src/ticketing.rs @@ -54,6 +54,7 @@ pub(crate) async fn issue_possible_ticket(db: &mut Db, plate: Plate, camera_id: continue; } + db.ticket_plate(day, plate_name.clone()); let dispatcher = db.get_dispatcher_for_road(road.clone()); if dispatcher.is_none() { @@ -64,7 +65,6 @@ pub(crate) async fn issue_possible_ticket(db: &mut Db, plate: Plate, camera_id: info!("Sending ticket: {ticket:?}"); let _ = dispatcher.unwrap().send(ticket.clone().into()).await; - db.ticket_plate(day, plate_name.clone()); } } }