Skip to content

Commit a134eb7

Browse files
committed
common: small cleanup
Signed-off-by: Matteo Cafasso <[email protected]>
1 parent 3baeff8 commit a134eb7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/cache.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ defmodule RabbitMQ.MessageDeduplicationPlugin.Cache do
102102
end
103103

104104
# Inserts the entry if it doesn't exist.
105-
# If the cache is full, remove an element to make space.
105+
# If the cache is full, it removes an element to make space.
106106
def handle_call({:insert, cache, entry, ttl}, _from, state) do
107107
function = fn ->
108108
if cache_member?(cache, entry) do

lib/common.ex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ defmodule RabbitMQ.MessageDeduplicationPlugin.Common do
5858
Retrieve the given header from the message.
5959
"""
6060
@spec message_header(basic_message, String.t) :: String.t | nil
61-
def message_header(basic_message(content:
62-
content(properties: properties)), header) do
61+
def message_header(message, header) do
62+
basic_message(content: content(properties: properties)) = message
63+
6364
case properties do
6465
basic_properties(headers: headers) when is_list(headers) ->
6566
rabbit_keyfind(headers, header)

0 commit comments

Comments
 (0)