summaryrefslogtreecommitdiff
path: root/src/priority_queue.erl
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2009-03-31 13:11:32 +0100
committerMatthias Radestock <matthias@lshift.net>2009-03-31 13:11:32 +0100
commit6cb73add3a0ec8e5ce619d65e3939299fdbfb3f5 (patch)
tree4f02e90ccec6fcf891c6d589fe9bafb37e29b730 /src/priority_queue.erl
parentccd07959dcc4f57db3ca84a6def335426964380b (diff)
downloadrabbitmq-server-6cb73add3a0ec8e5ce619d65e3939299fdbfb3f5.tar.gz
small simplification
Diffstat (limited to 'src/priority_queue.erl')
-rw-r--r--src/priority_queue.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/priority_queue.erl b/src/priority_queue.erl
index 57175102..1ad4b34a 100644
--- a/src/priority_queue.erl
+++ b/src/priority_queue.erl
@@ -90,8 +90,8 @@ in(X, 0, {queue, [_] = In, []}) ->
{queue, [X], In};
in(X, 0, {queue, In, Out}) when is_list(In), is_list(Out) ->
{queue, [X|In], Out};
-in(X, Priority, {queue, In, Out}) ->
- in(X, Priority, {pqueue, [{0, {queue, In, Out}}]});
+in(X, Priority, Q = {queue, _, _}) ->
+ in(X, Priority, {pqueue, [{0, Q}]});
in(X, Priority, {pqueue, Queues}) ->
P = -Priority,
{pqueue, case lists:keysearch(P, 1, Queues) of