Skip to content

Commit f970753

Browse files
committed
Remove case args
Signed-off-by: Gabriele Santomaggio <[email protected]>
1 parent 93946ee commit f970753

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

deps/rabbit/src/rabbit_amqp_management.erl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,8 @@ handle_http_req(HttpMethod = <<"PUT">>,
146146
Result;
147147
{error, not_found} ->
148148
PermCache2 = check_dead_letter_exchange(QName, QArgs, User, PermCache1),
149-
try rabbit_amqqueue:declare(
149+
try case rabbit_amqqueue:declare(
150150
QName, Durable, AutoDelete, QArgs, Owner, Username) of
151-
ARGS ->
152-
case ARGS of
153151
{new, Q} ->
154152
rabbit_core_metrics:queue_created(QName),
155153
{Q, 0, 0, <<"201">>, PermCache2};
@@ -169,9 +167,7 @@ handle_http_req(HttpMethod = <<"PUT">>,
169167
Reason,
170168
ReasonArgs);
171169
{protocol_error, _ErrorType, Reason, ReasonArgs} ->
172-
throw(<<"400">>, Reason, ReasonArgs);
173-
{precondition_failed, Reason, ReasonArgs} ->
174-
throw(<<"409">>, Reason, ReasonArgs)
170+
throw(<<"400">>, Reason, ReasonArgs)
175171
end
176172
catch exit:#amqp_error{name = precondition_failed,
177173
explanation = Expl} ->

0 commit comments

Comments
 (0)