Skip to content

Commit

Permalink
Merge pull request #322 from choznerol/refactor/elixir/warnings
Browse files Browse the repository at this point in the history
refactor(elixir): fix deprecation warnings
  • Loading branch information
FGRibreau authored Nov 4, 2021
2 parents 461150d + 15e6f3a commit 598c544
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions platform/elixir/mail_checker.ex

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions platform/elixir/mail_checker.tmpl.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defmodule MailChecker do
@blacklist Enum.into([{{& listSTR }}], HashSet.new)
@blacklist Enum.into([{{& listSTR }}], MapSet.new)

def blacklist, do: @blacklist

Expand All @@ -8,7 +8,7 @@ defmodule MailChecker do
end

def in_blacklist?(email) do
Enum.any?(extract_domain_suffixes(email), fn domain -> HashSet.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 598c544

Please sign in to comment.