From e255529da5c2366f1a9c4eb823d3c3d02c237eae Mon Sep 17 00:00:00 2001 From: Viacheslav Kovalev Date: Wed, 22 Apr 2015 18:56:09 +0300 Subject: Get rid of rebar_utils:tup_umerge/2 patching --- src/rebar_utils.erl | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/rebar_utils.erl') diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index 76be9a8..004ed35 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -257,20 +257,7 @@ tup_sort(List) -> tup_umerge([], Olds) -> Olds; tup_umerge([New|News], Olds) -> - reverse_deduplicate( umerge(News, Olds, [], New) ). - -reverse_deduplicate(List) -> - lists:reverse( do_deduplicate(lists:reverse(List), []) ). - -do_deduplicate([], Acc) -> - Acc; -do_deduplicate([Value | Rest], Acc) -> - case lists:member(Value, Acc) of - true -> - do_deduplicate(Rest, Acc); - false -> - do_deduplicate(Rest, [Value | Acc]) - end. + lists:reverse( umerge(News, Olds, [], New) ). %% This is equivalent to umerge2_2 in the stdlib, except we use the expanded %% value/key only to compare -- cgit v1.1