From 4bc1d16f2461c24f511208b80c0a8e3d29d81962 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Fri, 17 Jan 2025 23:10:22 +0200 Subject: [PATCH] Fix autoboxing warning --- src/honey/sql/util.cljc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/honey/sql/util.cljc b/src/honey/sql/util.cljc index 3d01c25..0dcc349 100644 --- a/src/honey/sql/util.cljc +++ b/src/honey/sql/util.cljc @@ -82,8 +82,9 @@ separator is not present in the haystack at all." [s sep] (loop [start 0, res []] - (if-let [sep-idx (clojure.string/index-of s sep start)] - (recur (inc sep-idx) (conj res (subs s start sep-idx))) + (if-some [sep-idx (clojure.string/index-of s sep start)] + (let [sep-idx (long sep-idx)] + (recur (inc sep-idx) (conj res (subs s start sep-idx)))) (if (= start 0) ;; Fastpath - zero separators in s [s]