summaryrefslogtreecommitdiff
path: root/src/rebar_deps.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2014-08-23 14:18:22 -0500
committerTristan Sloughter <t@crashfast.com>2014-08-23 14:18:22 -0500
commit5bb99b81db5f0b153282409d1fcf635b290e979f (patch)
tree7939b1f7cb6fda230f4707bc44292c8958757e3f /src/rebar_deps.erl
parentb37fe2c4bbe0e47399408f8feb59b5b0ab98a592 (diff)
switched package index to dict
Diffstat (limited to 'src/rebar_deps.erl')
-rw-r--r--src/rebar_deps.erl9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index e050952..5165950 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -75,15 +75,12 @@ do(State) ->
atom_to_binary(Name, utf8)
end, Deps),
{ok, Solved} = rlx_depsolver:solve(Graph, Goals),
-
M = lists:map(fun({Name, Vsn}) ->
- {ok, P} = ec_lists:find(fun(App) ->
- Name =:= proplists:get_value(<<"name">>, App)
- andalso to_binary(rlx_depsolver:format_version(Vsn)) =:= proplists:get_value(<<"vsn">>, App)
- end, Packages),
+ FmtVsn = to_binary(rlx_depsolver:format_version(Vsn)),
+ {ok, P} = dict:find({Name, FmtVsn}, Packages),
Link = proplists:get_value(<<"link">>, P),
{Name, Vsn, {Name
- ,to_binary(rlx_depsolver:format_version(Vsn))
+ ,FmtVsn
,Link}}
end, Solved),