Skip to content

Commit d3752c4

Browse files
committed
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.
1 parent 777fd6f commit d3752c4

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
@@ -324,12 +324,10 @@ is_server_named_allowed(Args) ->
324324
Type = get_queue_type(Args),
325325
rabbit_queue_type:is_server_named_allowed(Type).
326326

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

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

0 commit comments

Comments
 (0)