Skip to content

Commit 5c87031

Browse files
Merge pull request #14089 from rabbitmq/mergify/bp/v4.1.x/pr-14088
Avoid list allocation (backport #14088)
2 parents 329d6f5 + 3057fbc commit 5c87031

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/rabbit/src/rabbit_fifo.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2806,7 +2806,7 @@ smallest_raft_index(#?STATE{messages = Messages,
28062806
SmallestDlxRaIdx = rabbit_fifo_dlx:smallest_raft_index(DlxState),
28072807
SmallestMsgsRaIdx = rabbit_fifo_q:get_lowest_index(Messages),
28082808
SmallestRaIdx = rabbit_fifo_index:smallest(Indexes),
2809-
lists:min([SmallestDlxRaIdx, SmallestMsgsRaIdx, SmallestRaIdx]).
2809+
min(min(SmallestDlxRaIdx, SmallestMsgsRaIdx), SmallestRaIdx).
28102810

28112811
make_requeue(ConsumerKey, Notify, [{MsgId, Idx, Header, Msg}], Acc) ->
28122812
lists:reverse([{append,

0 commit comments

Comments
 (0)