Use map_join instead of map+join

This commit is contained in:
Claudio Ortolina
2025-02-18 10:14:31 +00:00
parent c25402cd4d
commit 025a5105ed
3 changed files with 3 additions and 12 deletions
@@ -9,10 +9,7 @@ defmodule MusicBrainz.ReleaseGroupSearchResult do
id: rg["id"],
type: ReleaseGroup.parse_type(rg["primary-type"]),
title: rg["title"],
artists:
rg["artist-credit"]
|> Enum.map(fn ac -> ac["artist"]["name"] end)
|> Enum.join(", "),
artists: Enum.map_join(rg["artist-credit"], ", ", fn ac -> ac["artist"]["name"] end),
release: rg["first-release-date"]
}
end