Fix autoboxing warning

This commit is contained in:
Oleksandr Yakushev 2025-01-17 23:10:22 +02:00
parent 206f980093
commit 4bc1d16f24

View file

@ -82,8 +82,9 @@
separator is not present in the haystack at all." separator is not present in the haystack at all."
[s sep] [s sep]
(loop [start 0, res []] (loop [start 0, res []]
(if-let [sep-idx (clojure.string/index-of s sep start)] (if-some [sep-idx (clojure.string/index-of s sep start)]
(recur (inc sep-idx) (conj res (subs s start sep-idx))) (let [sep-idx (long sep-idx)]
(recur (inc sep-idx) (conj res (subs s start sep-idx))))
(if (= start 0) (if (= start 0)
;; Fastpath - zero separators in s ;; Fastpath - zero separators in s
[s] [s]