Skip to content

Commit e592adc

Browse files
committed
Fix a spec that caused two warnings
1 parent d8a6dac commit e592adc

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
@@ -29,7 +29,7 @@
2929
-type properties_input() ::
3030
rabbit_framing:amqp_property_record() | [{atom(), any()}].
3131
-type publish_result() ::
32-
{ok, [pid()]} | rabbit_types:error('not_found').
32+
ok | rabbit_types:error('not_found').
3333
-type header() :: any().
3434
-type headers() :: rabbit_framing:amqp_table() | 'undefined'.
3535

@@ -107,8 +107,7 @@ publish(Delivery = #delivery{
107107

108108
publish(X, Delivery) ->
109109
Qs = rabbit_amqqueue:lookup(rabbit_exchange:route(X, Delivery)),
110-
DeliveredQPids = rabbit_amqqueue:deliver(Qs, Delivery),
111-
{ok, DeliveredQPids}.
110+
rabbit_amqqueue:deliver(Qs, Delivery).
112111

113112
delivery(Mandatory, Confirm, Message, MsgSeqNo) ->
114113
#delivery{mandatory = Mandatory, confirm = Confirm, sender = self(),

src/rabbit_trace.erl

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

0 commit comments

Comments
 (0)