Checkpoint
This commit is contained in:
+4
-1
@@ -68,10 +68,13 @@ impl Gtfs {
|
||||
if trips.contains_key(&stop_time.trip_id) {
|
||||
let stop_timestamp = stop_time.departure_time.or(stop_time.arrival_time).unwrap();
|
||||
debug!("Stop timestamp {} current timestamp {}", stop_timestamp, current_timestamp);
|
||||
let trip= &self.trips.get(&stop_time.trip_id).unwrap();
|
||||
if current_timestamp < stop_timestamp.into() {
|
||||
let arrival: Arrival = Arrival {
|
||||
route: self.routes.get(&self.trips.get(&stop_time.trip_id).unwrap().route_id).unwrap(),
|
||||
route: self.routes.get(&trip.route_id).unwrap(),
|
||||
stop: self.stops.get(&stop_time.stop_id).unwrap(),
|
||||
stop_time: stop_time,
|
||||
trip: &trip,
|
||||
departure_time: NaiveTime::from_num_seconds_from_midnight_opt(stop_timestamp, 0).unwrap()
|
||||
};
|
||||
arrivals.push(arrival);
|
||||
|
||||
Reference in New Issue
Block a user