aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test
diff options
context:
space:
mode:
authorAndrey Pampukha <[email protected]>2010-03-19 09:09:46 +0100
committerRaimo Niskanen <[email protected]>2010-06-09 16:19:14 +0200
commit485a982ef7e7d2ffcdfb2606b6e2f4b66d000bac (patch)
treed5bd2cc27ca277e7a6e270eab442cd827508b81e /lib/common_test
parentdd67e73980ac0c8b601079c2e3f27701c367936c (diff)
downloadotp-485a982ef7e7d2ffcdfb2606b6e2f4b66d000bac.tar.gz
otp-485a982ef7e7d2ffcdfb2606b6e2f4b66d000bac.tar.bz2
otp-485a982ef7e7d2ffcdfb2606b6e2f4b66d000bac.zip
Replace own has_element/2 with lists:config/2
Diffstat (limited to 'lib/common_test')
-rwxr-xr-xlib/common_test/src/ct_config.erl9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/common_test/src/ct_config.erl b/lib/common_test/src/ct_config.erl
index 728dcde6af..0ae178ef02 100755
--- a/lib/common_test/src/ct_config.erl
+++ b/lib/common_test/src/ct_config.erl
@@ -438,17 +438,10 @@ update_conf(Name, NewConfig) ->
end, Old),
ok.
-has_element(_, [])->
- false;
-has_element(Element, [Element|_Rest])->
- true;
-has_element(Element, [_|Rest])->
- has_element(Element, Rest).
-
remove_duplicates([], Acc)->
Acc;
remove_duplicates([{Handler, File}|Rest], Acc)->
- case has_element({Handler, File}, Acc) of
+ case lists:member({Handler, File}, Acc) of
false->
remove_duplicates(Rest, [{Handler, File}|Acc]);
true->