From 37de8f157a5388fd54e0057d76ea5f6f522271d6 Mon Sep 17 00:00:00 2001 From: Josh Larson Date: Wed, 11 Dec 2024 13:44:35 -0500 Subject: [PATCH] cleanup: Rename some misleadingly-named variables --- lib/dotcom/trip_plan/leg_to_segment_helper.ex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dotcom/trip_plan/leg_to_segment_helper.ex b/lib/dotcom/trip_plan/leg_to_segment_helper.ex index 832d55dd12..912aa9452f 100644 --- a/lib/dotcom/trip_plan/leg_to_segment_helper.ex +++ b/lib/dotcom/trip_plan/leg_to_segment_helper.ex @@ -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