Skip to content

Commit bb5fda6

Browse files
the-mikedavismergify[bot]
authored andcommitted
minor: Correct outdated spec for rabbit_amqqueue:lookup/1
The clause of the spec that allowed passing a list of queue name resources is out of date: the guard prevents a list from ever matching. (cherry picked from commit d3752c4)
1 parent 7b64132 commit bb5fda6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

deps/rabbit/src/rabbit_amqqueue.erl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,10 @@ is_server_named_allowed(Args) ->
325325
Type = get_queue_type(Args),
326326
rabbit_queue_type:is_server_named_allowed(Type).
327327

328-
-spec lookup
329-
(name()) ->
330-
rabbit_types:ok(amqqueue:amqqueue()) |
331-
rabbit_types:error('not_found');
332-
([name()]) ->
333-
[amqqueue:amqqueue()].
328+
-spec lookup(QueueName) -> Ret when
329+
QueueName :: name(),
330+
Ret :: rabbit_types:ok(amqqueue:amqqueue())
331+
| rabbit_types:error('not_found').
334332

335333
lookup(Name) when is_record(Name, resource) ->
336334
rabbit_db_queue:get(Name).

0 commit comments

Comments
 (0)