use lists:unzip/1
Just a little thing I noticed could be improved.
This commit is contained in:
parent
3da9bd570b
commit
4f1958b210
@ -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?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user