Skip to content

Commit b49c242

Browse files
committed
Fix a spec that caused two warnings
1 parent 8f237ea commit b49c242

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/lager_exchange_backend.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ handle_log_event({log, Message},
165165
headers = Headers},
166166
Body = rabbit_data_coercion:to_binary(Formatter:format(Message, FormatConfig)),
167167
case rabbit_basic:publish(LogExch, RoutingKey, AmqpMsg, Body) of
168-
{ok, _DeliveredQPids} -> ok;
169-
{error, not_found} -> ok
168+
ok -> ok;
169+
{error, not_found} -> ok
170170
end,
171171
{ok, State};
172172
false ->

src/rabbit_basic.erl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
-type properties_input() ::
3131
rabbit_framing:amqp_property_record() | [{atom(), any()}].
3232
-type publish_result() ::
33-
{ok, [pid()]} | rabbit_types:error('not_found').
33+
ok | rabbit_types:error('not_found').
3434
-type header() :: any().
3535
-type headers() :: rabbit_framing:amqp_table() | 'undefined'.
3636

@@ -76,8 +76,7 @@ publish(Delivery = #delivery{
7676

7777
publish(X, Delivery) ->
7878
Qs = rabbit_amqqueue:lookup(rabbit_exchange:route(X, Delivery)),
79-
DeliveredQPids = rabbit_amqqueue:deliver(Qs, Delivery),
80-
{ok, DeliveredQPids}.
79+
rabbit_amqqueue:deliver(Qs, Delivery).
8180

8281
-spec delivery
8382
(boolean(), boolean(), rabbit_types:message(), undefined | integer()) ->

src/rabbit_trace.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ trace(#exchange{name = Name}, #basic_message{exchange_name = Name},
106106
ok;
107107
trace(X, Msg = #basic_message{content = #content{payload_fragments_rev = PFR}},
108108
RKPrefix, RKSuffix, Extra) ->
109-
{ok, _} = rabbit_basic:publish(
109+
ok = rabbit_basic:publish(
110110
X, <<RKPrefix/binary, ".", RKSuffix/binary>>,
111111
#'P_basic'{headers = msg_to_table(Msg) ++ Extra}, PFR),
112112
ok.

0 commit comments

Comments
 (0)