Merge pull request #564 from alexander-yakushev/fix-warning

Fix autoboxing warning
This commit is contained in:
Sean Corfield 2025-01-17 21:17:18 +00:00 committed by GitHub
commit 13eb8fe859
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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]