Commit 99c7ffdb authored by Egor's avatar Egor

use MapSet instead of List

parent 03e0fb26
......@@ -40,7 +40,7 @@ defmodule AutoLinker.Parser do
"ssb://"
]
@tlds "./priv/tlds.txt" |> File.read!() |> String.split("\n", trim: true)
@tlds "./priv/tlds.txt" |> File.read!() |> String.split("\n", trim: true) |> MapSet.new()
@default_opts ~w(url)a
......@@ -344,8 +344,7 @@ defmodule AutoLinker.Parser do
true
else
tld = host |> String.split(".") |> List.last()
Enum.member?(@tlds, tld)
MapSet.member?(@tlds, tld)
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment