Skip to content

Commit

Permalink
refactor(elixir): fix warning:
Browse files Browse the repository at this point in the history
Fix this warning:

  warning: variable "blacklist" does not exist and is being expanded to
"blacklist()", please use parentheses to remove the ambiguity or change
the variable name
    platform/elixir/mail_checker.ex:11
  • Loading branch information
choznerol committed Nov 2, 2021
1 parent 7b91a01 commit 15e6f3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion platform/elixir/mail_checker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule MailChecker do
end

def in_blacklist?(email) do
Enum.any?(extract_domain_suffixes(email), fn domain -> MapSet.member?(blacklist, domain) end)
Enum.any?(extract_domain_suffixes(email), fn domain -> MapSet.member?(blacklist(), domain) end)
end

def extract_domain_suffixes(email) do
Expand Down
2 changes: 1 addition & 1 deletion platform/elixir/mail_checker.tmpl.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule MailChecker do
end

def in_blacklist?(email) do
Enum.any?(extract_domain_suffixes(email), fn domain -> MapSet.member?(blacklist, domain) end)
Enum.any?(extract_domain_suffixes(email), fn domain -> MapSet.member?(blacklist(), domain) end)
end

def extract_domain_suffixes(email) do
Expand Down

0 comments on commit 15e6f3a

Please sign in to comment.