From f686c4650a80992acbecc77e2b68dac012f38192 Mon Sep 17 00:00:00 2001 From: sloane <1699281+sloanelybutsurely@users.noreply.github.com> Date: Mon, 22 Apr 2024 09:54:12 -0400 Subject: [PATCH] use binary_part/3 for elixir 1.11 support --- lib/type_id.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/type_id.ex b/lib/type_id.ex index 6333dcb..8661ffc 100644 --- a/lib/type_id.ex +++ b/lib/type_id.ex @@ -181,10 +181,10 @@ defmodule TypeID do prefix = str - |> binary_slice(0, size - 26) + |> binary_part(0, size - 26) |> String.replace(~r/_$/, "") - suffix = binary_slice(str, size - 26, 26) + suffix = binary_part(str, size - 26, 26) if prefix == "" do raise ArgumentError, "A TypeID without a prefix should not have a leading underscore"