Fix autoboxing warning
This commit is contained in:
parent
206f980093
commit
4bc1d16f24
1 changed files with 3 additions and 2 deletions
|
|
@ -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]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue