From 0774ff8c00ead9ad2802050ffd09eac810a234dd Mon Sep 17 00:00:00 2001 From: Alex Vondrak Date: Sun, 9 Jun 2024 16:25:07 -0700 Subject: [PATCH] Fix deprecation warnings in latest inet_cidr warning: InetCidr.parse/2 is deprecated. Use `parse_cidr!/2` instead (or `parse_cidr/2` for {:ok, {start,end,prefix}} / {:error,msg} tuples) --- bench/check.exs | 2 +- bench/parse.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bench/check.exs b/bench/check.exs index a87983a..3c70fb0 100644 --- a/bench/check.exs +++ b/bench/check.exs @@ -13,7 +13,7 @@ cidrs = Bench.Inputs.cidrs(1_000) parsed_cidrs = %{ remote_ip: Enum.map(cidrs, &RemoteIp.Block.parse!/1), - inet_cidr: Enum.map(cidrs, &InetCidr.parse(&1, true)), + inet_cidr: Enum.map(cidrs, &InetCidr.parse_cidr!(&1, true)), cider: Enum.map(cidrs, &Cider.parse/1), cidr: Enum.map(cidrs, &CIDR.parse/1), } diff --git a/bench/parse.exs b/bench/parse.exs index 4392f03..1bf7c4d 100644 --- a/bench/parse.exs +++ b/bench/parse.exs @@ -4,7 +4,7 @@ cidrs = Bench.Inputs.cidrs(1_000) suite = %{ remote_ip: fn -> Enum.each(cidrs, &RemoteIp.Block.parse!/1) end, - inet_cidr: fn -> Enum.each(cidrs, &InetCidr.parse(&1, true)) end, + inet_cidr: fn -> Enum.each(cidrs, &InetCidr.parse_cidr!(&1, true)) end, cider: fn -> Enum.each(cidrs, &Cider.parse/1) end, cidr: fn -> Enum.each(cidrs, &CIDR.parse/1) end, }