Skip to content

Commit

Permalink
Remove unused code rendered obsolete by Muv
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Mar 22, 2024
1 parent 2e2daca commit 81bf0b9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
1 change: 1 addition & 0 deletions osm2lanes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ impl LaneType {
/// Note that the `lanes` tag counts car driving lanes, excluding bike lanes, whereas the
/// `:lanes` suffix specifies that each lane, including bike lanes, should have a value between
/// `|`s. This function identifies the latter kind.
// TODO This breaks the abstraction boundary, now that Muv handles this kind of detail
pub fn is_tagged_by_lanes_suffix(&self) -> bool {
match self {
LaneType::Driving => true,
Expand Down
19 changes: 0 additions & 19 deletions osm2streets/src/road.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,25 +302,6 @@ impl Road {
self.total_width() / 2.0
}

/// Calculates the number of (forward, both_ways, backward) lanes. The order of the lanes
/// doesn't matter.
pub fn _travel_lane_counts(&self) -> (usize, usize, usize) {
let mut result = (0, 0, 0);
for lane in &self.lane_specs_ltr {
if !lane.lt.is_tagged_by_lanes_suffix() {
continue;
}
if lane.lt == LaneType::SharedLeftTurn {
result.1 += 1;
} else if lane.dir == Direction::Forward {
result.0 += 1;
} else {
result.2 += 1;
}
}
result
}

/// Calculates the distance from the left edge to the placement.
pub fn left_edge_offset_of(
&self,
Expand Down

0 comments on commit 81bf0b9

Please sign in to comment.