From a357ae20cd432d752c9b9943707fbd9476b50dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 9 Aug 2024 15:35:02 +0200 Subject: [PATCH] Use :binary module directly --- lib/postgrex/replication_connection.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/postgrex/replication_connection.ex b/lib/postgrex/replication_connection.ex index ee73f917..6a5ec734 100644 --- a/lib/postgrex/replication_connection.ex +++ b/lib/postgrex/replication_connection.ex @@ -427,7 +427,7 @@ defmodule Postgrex.ReplicationConnection do """ @spec decode_lsn(String.t()) :: {:ok, integer} | :error def decode_lsn(lsn) when is_binary(lsn) do - with [file_id, offset] <- String.split(lsn, "/", trim: true), + with [file_id, offset] <- :binary.split(lsn, "/"), true <- byte_size(file_id) <= @max_lsn_component_size, true <- byte_size(offset) <= @max_lsn_component_size, {file_id, ""} when file_id >= 0 <- Integer.parse(file_id, 16),