diff --git a/sim/src/router.rs b/sim/src/router.rs index c318854a45..cfcfa9f22a 100644 --- a/sim/src/router.rs +++ b/sim/src/router.rs @@ -182,14 +182,7 @@ impl Router { self.path.add(step, map); } } else { - // TODO Fix by avoiding parking blackholes in the first place. - println!("{} can't find parking on {}, and also it's a dead-end, so they'll be stuck there forever. Vanishing.", vehicle.id, current_lane); - // TODO Hmm, actually, this might not be a border -- it just inevitably - // leads only to a border. - self.goal = Goal::EndAtBorder { - end_dist: map.get_l(current_lane).length(), - i: map.get_l(current_lane).dst_i, - }; + panic!("{} can't find parking on {}, and also it's a dead-end, so they'll be stuck there forever. Vanishing. Parking blackholes were wrong?", vehicle.id, current_lane); } return Some(ActionAtEnd::GotoLaneEnd); } diff --git a/sim/src/trips.rs b/sim/src/trips.rs index c8c4216773..4131ee3759 100644 --- a/sim/src/trips.rs +++ b/sim/src/trips.rs @@ -388,16 +388,7 @@ impl TripManager { let trip = &mut self.trips[self.active_trip_mode.remove(&AgentID::Car(car)).unwrap().0]; match trip.legs.pop_front().unwrap() { TripLeg::Drive(_, DrivingGoal::Border(int, _)) => assert_eq!(i, int), - _ => { - // TODO Should be unreachable - println!( - "Aborting {} at {} because {} couldn't find parking and got stuck", - trip.id, now, car - ); - self.unfinished_trips -= 1; - trip.aborted = true; - return; - } + _ => unreachable!(), }; assert!(trip.legs.is_empty()); assert!(!trip.finished_at.is_some());