We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
reject_timeless_predictions/1
1 parent 2023ac2 commit 945f281Copy full SHA for 945f281
lib/dotcom/schedule_finder/upcoming_departures.ex
@@ -125,11 +125,7 @@ defmodule Dotcom.ScheduleFinder.UpcomingDepartures do
125
end
126
127
defp reject_timeless_predictions(predictions) do
128
- predictions
129
- |> Enum.reject(fn
130
- %Prediction{arrival_time: nil, departure_time: nil} -> true
131
- _ -> false
132
- end)
+ predictions |> Enum.reject(&(prediction_time(&1) == nil))
133
134
135
def to_upcoming_departure(%{
0 commit comments