summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-07-26 17:01:51 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2011-07-26 17:01:51 +0100
commit6db4fa05544a03474c1a75d32ea5608e182abc75 (patch)
tree055475ed90e77a3a08e2c9a27262b35dd6a2b6bd /src
parent99a23a6ab47505b08cbd7e72aab5d6624c68e81f (diff)
downloadrabbitmq-server-git-6db4fa05544a03474c1a75d32ea5608e182abc75.tar.gz
dict => orddict
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_amqqueue_process.erl19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index 4b144ff480..4492bbd852 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -1167,12 +1167,13 @@ handle_pre_hibernate(State = #q{backing_queue = BQ,
format_message_queue(_Opt, Mailbox) ->
Len = priority_queue:len(Mailbox),
- {Len, case Len > 100 of
- false -> priority_queue:to_list(Mailbox);
- true -> {summary,
- dict:to_list(
- lists:foldl(
- fun ({P, _V}, Counts) ->
- dict:update_counter(P, 1, Counts)
- end, dict:new(), priority_queue:to_list(Mailbox)))}
- end}.
+ {Len,
+ case Len > 100 of
+ false -> priority_queue:to_list(Mailbox);
+ true -> {summary,
+ orddict:to_list(
+ lists:foldl(
+ fun ({P, _V}, Counts) ->
+ orddict:update_counter(P, 1, Counts)
+ end, orddict:new(), priority_queue:to_list(Mailbox)))}
+ end}.