diff options
| author | Matthias Radestock <matthias@lshift.net> | 2009-03-31 13:11:32 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2009-03-31 13:11:32 +0100 |
| commit | d36d44d4b9b91ddf396226fdff139688c2bbabcb (patch) | |
| tree | 4f02e90ccec6fcf891c6d589fe9bafb37e29b730 /src | |
| parent | 78fadef2928be9e2d7533613bfcc98224ada1854 (diff) | |
| download | rabbitmq-server-git-d36d44d4b9b91ddf396226fdff139688c2bbabcb.tar.gz | |
small simplification
Diffstat (limited to 'src')
| -rw-r--r-- | src/priority_queue.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/priority_queue.erl b/src/priority_queue.erl index 5717510224..1ad4b34a9a 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 |
