summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Mazzoli <francesco@rabbitmq.com>2012-04-11 17:35:03 +0100
committerFrancesco Mazzoli <francesco@rabbitmq.com>2012-04-11 17:35:03 +0100
commiteb12abb53722eb68e6c515e83bcbdf40772e784e (patch)
tree4d44218d399b6152cda2a05ee0f613a8123ef3fa
parentc484a0cccf778af11280102e7aba52e4aa31f938 (diff)
downloadrabbitmq-server-eb12abb53722eb68e6c515e83bcbdf40772e784e.tar.gz
gb_sets:fold instead of lists:foldl.
-rw-r--r--src/dtree.erl2
-rw-r--r--src/rabbit_misc.erl2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dtree.erl b/src/dtree.erl
index b792c681..b455a548 100644
--- a/src/dtree.erl
+++ b/src/dtree.erl
@@ -160,4 +160,4 @@ prune(SKS, PKS, S) ->
end, S, SKS).
gb_sets_difference(S1, S2) ->
- lists:foldl(fun gb_sets:delete_any/2, S1, gb_sets:to_list(S2)).
+ gb_sets:fold(fun gb_sets:delete_any/2, S1, S2).
diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl
index e46c7150..0aacd654 100644
--- a/src/rabbit_misc.erl
+++ b/src/rabbit_misc.erl
@@ -916,4 +916,4 @@ os_cmd(Command) ->
end.
gb_sets_difference(S1, S2) ->
- lists:foldl(fun gb_sets:delete_any/2, S1, gb_sets:to_list(S2)).
+ gb_sets:fold(fun gb_sets:delete_any/2, S1, S2).