Skip to content

Commit

Permalink
Remove dead code (private, wasn't called locally)
Browse files Browse the repository at this point in the history
  • Loading branch information
duijf committed Oct 25, 2015
1 parent 374344c commit 60f1da6
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions lib/cidr.ex
Expand Up @@ -165,32 +165,6 @@ defmodule CIDR do
{ a1, b1, c1, d1, e1, f1, g1, h1 }
end

defp is_ipv6({a, b, c, d, e, f, g, h}) do
a in 0..65535 and
b in 0..65535 and
c in 0..65535 and
d in 0..65535 and
e in 0..65535 and
f in 0..65535 and
g in 0..65535 and
h in 0..65535
end
defp is_ipv6(_), do: false

defp is_ipv4({a, b, c, d}) do
a in 0..255 and
b in 0..255 and
c in 0..255 and
d in 0..255
end
defp is_ipv4(_), do: false

defp mask_by_ip(address) do
cond do
is_ipv4(address) -> 32
is_ipv6(address) -> 128
end
end

defp int(x) do
case x |> Integer.parse do
Expand Down

0 comments on commit 60f1da6

Please sign in to comment.