Skip to content

Commit

Permalink
cleanup: Rename some misleadingly-named variables
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlarson committed Dec 11, 2024
1 parent b200b37 commit 37de8f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/dotcom/trip_plan/leg_to_segment_helper.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ defmodule Dotcom.TripPlan.LegToSegmentHelper do
]
end

defp append_end_location([{_, leg} = last_leg]) do
[last_leg, {:location_segment, %{time: leg.stop, place: leg.to}}]
defp append_end_location([{_, leg} = last_segment]) do
[last_segment, {:location_segment, %{time: leg.stop, place: leg.to}}]
end

defp append_end_location([first_leg | rest_of_legs]) do
[first_leg | append_end_location(rest_of_legs)]
defp append_end_location([first_segment | rest_of_segments]) do
[first_segment | append_end_location(rest_of_segments)]
end
end

0 comments on commit 37de8f1

Please sign in to comment.