fn search_trips(&mut self) {
        let mut n = 0;
        for result in self.gtfs.trips() {
            n += 1;
            if let Ok(entry) = result {
                let trip_id = entry.trip_id.clone();
                let route_id = entry.route_id.clone();
                let service_id = entry.service_id.clone();
                if self.trip_ids.contains_key(&trip_id) {
                    self.service_ids.insert(service_id, true);
                    self.route_ids.insert(route_id, true);
                    self.trips.insert(trip_id, entry);
                }
            }
        }
        if self.debug {
            println!("{}: loaded {} trips ({} retained)", "Debug".cyan(), n, self.trips.len());
        }
    }
// Get routes and services from trips
Get routes and services from trips
Get routes and services from trips
fn search_trips(&mut self) {
        let mut n = 0;
        for result in self.gtfs.trips() {
            n += 1;
            if let Ok(entry) = result {
                let trip_id = entry.trip_id.clone();
                let route_id = entry.route_id.clone();
                let service_id = entry.service_id.clone();
                if self.trip_ids.contains_key(&trip_id) {
                    self.service_ids.insert(service_id, true);
                    self.route_ids.insert(route_id, true);
                    self.trips.insert(trip_id, entry);
                }
            }
        }
        if self.debug {
            println!("{}: loaded {} trips ({} retained)", "Debug".cyan(), n, self.trips.len());
        }
    }
fn search_trips ( & mut self ) { let mut n = 0 ; for result in self . gtfs . trips ( ) { n += 1 ; if let Ok ( entry ) = result { let trip_id = entry . trip_id . clone ( ) ; let route_id = entry . route_id . clone ( ) ; let service_id = entry . service_id . clone ( ) ; if self . trip_ids . contains_key ( & trip_id ) { self . service_ids . insert ( service_id , true ) ; self . route_ids . insert ( route_id , true ) ; self . trips . insert ( trip_id , entry ) ; } } } if self . debug { println ! ( " " " " cyan ( ) n self trips len ( ) ) ; } }
Get routes and services from trips
Get routes and services from trips
&mut self
&mut self