Skip to content

Commit

Permalink
Merge branch 'pk/ltotd-phase-1' of https://github.com/mbta/realtime_s…
Browse files Browse the repository at this point in the history
…igns into pk/ltotd-phase-1
  • Loading branch information
PaulJKim committed Apr 30, 2024
2 parents 7767e3b + 946a8cd commit 76e1a5c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/signs/utilities/last_trip.ex
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ defmodule Signs.Utilities.LastTrip do
message_string = Content.Message.to_string(message)

if is_list(message_string) do
Enum.max_by(message_string, fn {string, _} -> String.length(string) end)
|> elem(0)
|> String.length()
Stream.map(message_string, fn {string, _} -> String.length(string) end)
|> Enum.max()
else
String.length(message_string)
end
Expand Down

0 comments on commit 76e1a5c

Please sign in to comment.