summaryrefslogtreecommitdiff
path: root/src/bpqueue.erl
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2010-05-13 14:22:07 +0100
committerMatthew Sackman <matthew@lshift.net>2010-05-13 14:22:07 +0100
commit6bec44b9485bf7868e8e3f98b2192f274bf7f691 (patch)
tree37c8a233e751b5e268c93ac45d5ef760c99b1e73 /src/bpqueue.erl
parent76ed373cea0a6b1b53e49e8abcb483061393c738 (diff)
downloadrabbitmq-server-git-6bec44b9485bf7868e8e3f98b2192f274bf7f691.tar.gz
One more test, and simplification of the bpqueue:to_list function
Diffstat (limited to 'src/bpqueue.erl')
-rw-r--r--src/bpqueue.erl5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/bpqueue.erl b/src/bpqueue.erl
index 0210436f30..a0c0c41b30 100644
--- a/src/bpqueue.erl
+++ b/src/bpqueue.erl
@@ -225,10 +225,7 @@ from_list(List) ->
to_list({0, _Q}) ->
[];
to_list({_N, Q}) ->
- lists:map(fun to_list1/1, queue:to_list(Q)).
-
-to_list1({Prefix, InnerQ}) ->
- {Prefix, queue:to_list(InnerQ)}.
+ [{Prefix, queue:to_list(InnerQ)} || {Prefix, InnerQ} <- queue:to_list(Q)].
%% map_fold_filter_[lr](FilterFun, Fun, Init, BPQ) -> {BPQ, Init}
%% where FilterFun(Prefix) -> boolean()