From 6fd8422cf558e363498ee6ee19ebd86ff28404ba Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Tue, 6 Oct 2020 13:05:23 -0700 Subject: [PATCH] Woops, fix headless build break --- headless/src/main.rs | 6 +++++- map_model/src/make/walking_turns.rs | 12 +++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/headless/src/main.rs b/headless/src/main.rs index 631cae4176..985af498a9 100644 --- a/headless/src/main.rs +++ b/headless/src/main.rs @@ -265,7 +265,11 @@ fn handle_command( TrafficSignalState { current_stage_idx, remaining_time, - accepted: sim.get_accepted_agents(i.id).into_iter().collect(), + accepted: sim + .get_accepted_agents(i.id) + .into_iter() + .map(|(a, _)| a) + .collect(), waiting: sim.get_waiting_agents(i.id), }, ); diff --git a/map_model/src/make/walking_turns.rs b/map_model/src/make/walking_turns.rs index 8c5b766ec9..89a4b83742 100644 --- a/map_model/src/make/walking_turns.rs +++ b/map_model/src/make/walking_turns.rs @@ -146,13 +146,11 @@ pub fn make_walking_turns(map: &Map, i: &Intersection, timer: &mut Timer) -> Vec } // TODO Need to filter out extraneous crosswalks. Why weren't they being created before? -fn _new_make_walking_turns( - driving_side: DrivingSide, - i: &Intersection, - all_roads: &Vec, - all_lanes: &Vec, - timer: &mut Timer, -) -> Vec { +pub fn _make_walking_turns_v2(map: &Map, i: &Intersection, timer: &mut Timer) -> Vec { + let driving_side = map.config.driving_side; + let all_roads = map.all_roads(); + let all_lanes = map.all_lanes(); + // Consider all roads in counter-clockwise order. Every road has up to two sidewalks. Gather // those in order, remembering what roads don't have them. let mut lanes: Vec> = Vec::new();