summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-07-21 18:17:42 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2011-07-21 18:17:42 +0100
commit1fbe4894892d45736e8c17c52f2ddaa3f347eda7 (patch)
tree88ae162081c916f59fcbefae8d8483cd58e6d715
parentcf2afc3c03850c9ec5618b8888c926d100599f32 (diff)
downloadrabbitmq-server-1fbe4894892d45736e8c17c52f2ddaa3f347eda7.tar.gz
factoring
-rw-r--r--src/rabbit_amqqueue_process.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index 60c1135e..f0db479f 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -1167,11 +1167,11 @@ handle_pre_hibernate(State = #q{backing_queue = BQ,
format_priority_mailbox(_Opt, Mailbox) ->
Len = priority_queue:len(Mailbox),
- case Len > 100 of
- false -> {Len, priority_queue:to_list(Mailbox)};
- true -> {Len, {dict:to_list(
+ {Len, case Len > 100 of
+ false -> priority_queue:to_list(Mailbox);
+ true -> {dict:to_list(
lists:foldl(
fun ({P, _V}, Counts) ->
dict:update_counter(P, 1, Counts)
- end, dict:new(), priority_queue:to_list(Mailbox)))}}
- end.
+ end, dict:new(), priority_queue:to_list(Mailbox)))}
+ end}.