Remove unnecessary fields from deserialization

This commit is contained in:
clerie 2024-07-28 15:19:17 +02:00
parent f9f9669446
commit 0dbe7ec080

View File

@ -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<Stop>,
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 {