use lists:unzip/1

Just a little thing I noticed could be improved.
This commit is contained in:
Jarvis Carroll 2026-01-13 01:19:29 +00:00
parent 3da9bd570b
commit 4f1958b210

View File

@ -732,8 +732,7 @@ coerce_map_to_record(O, N, MemberTypes, Map) ->
end.
coerce_record_to_map(O, N, MemberTypes, Tuple) ->
Names = [Name || {Name, _} <- MemberTypes],
Types = [Type || {_, Type} <- MemberTypes],
{Names, Types} = lists:unzip(MemberTypes),
Terms = tuple_to_list(Tuple),
% FIXME: We could go through and change the record_element paths into field
% paths?