pub(crate) fn filter_lanes(self, mut choices: Vec<LaneID>, map: &Map) -> Vec<LaneID> {
        choices.retain(|l| self.can_use(map.get_l(*l), map));
        if self == PathConstraints::Bike {
            let just_bike_lanes: Vec<LaneID> = choices
                .iter()
                .copied()
                .filter(|l| map.get_l(*l).is_biking())
                .collect();
            if !just_bike_lanes.is_empty() {
                return just_bike_lanes;
            }
        }
        choices
    }
/// Strict for bikes. If there are bike lanes, not allowed to use other lanes.
Strict for bikes. If there are bike lanes, not allowed to use other lanes.
Strict for bikes . If there are bike lanes not allowed to use other lanes .
pub(crate) fn filter_lanes(self, mut choices: Vec<LaneID>, map: &Map) -> Vec<LaneID> {
        choices.retain(|l| self.can_use(map.get_l(*l), map));
        if self == PathConstraints::Bike {
            let just_bike_lanes: Vec<LaneID> = choices
                .iter()
                .copied()
                .filter(|l| map.get_l(*l).is_biking())
                .collect();
            if !just_bike_lanes.is_empty() {
                return just_bike_lanes;
            }
        }
        choices
    }
pub ( crate ) fn filter_lanes ( self , mut choices : Vec < LaneID > , map : & Map ) -> Vec < LaneID > { choices . retain ( | l | self . can_use ( map . get_l ( * l ) , map ) ) ; if self == PathConstraints :: Bike { let just_bike_lanes : Vec < LaneID > = choices . iter ( ) . copied ( ) . filter ( | l | map . get_l ( * l ) . is_biking ( ) ) . collect ( ) ; if ! just_bike_lanes . is_empty ( ) { return just_bike_lanes ; } } choices }
Strict for bikes.
Strict for bikes .
self
choices
Vec<LaneID>
map
&Map