summaryrefslogtreecommitdiff
path: root/src
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
commit3ea2233ba38bd0e30535bdbba133642097bcdc95 (patch)
tree88ae162081c916f59fcbefae8d8483cd58e6d715 /src
parentb1929763fbcec8108ce02ef372806176c09b03ca (diff)
downloadrabbitmq-server-git-3ea2233ba38bd0e30535bdbba133642097bcdc95.tar.gz
factoring
Diffstat (limited to 'src')
-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 60c1135e01..f0db479f86 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}.