From 0dbe7ec080b2639653e0f84c8d49a81ed616829f Mon Sep 17 00:00:00 2001 From: clerie Date: Sun, 28 Jul 2024 15:19:17 +0200 Subject: [PATCH] Remove unnecessary fields from deserialization --- src/main.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7fa4f21..f09fbac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,6 @@ struct Train { number: String, //line: String, r#type: String, - admin: String, } #[derive(Deserialize)] @@ -41,7 +40,6 @@ struct Departure { route: Vec, train: Train, destination: String, - initialStopPlace: String, } #[derive(Deserialize)] @@ -251,10 +249,8 @@ async fn route_station_to_dest_station( if departure.destination.starts_with(&station_properties.name) { continue; } + let mut after_current_station = false; - if departure.initialStopPlace == station_properties.code { - after_current_station = true; - } let mut stops_at_destination = false; for stop in &departure.route {