From 2005c64230f6f80d8b86a4a085971a6dd1b2ff5b Mon Sep 17 00:00:00 2001 From: CreativeQuantum <> Date: Sat, 30 Dec 2023 03:09:53 +0100 Subject: [PATCH] Fix reflection warning --- deps.edn | 3 ++- src/wkok/openai_clojure/sse.clj | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/deps.edn b/deps.edn index c6adc3e..fce9dd2 100644 --- a/deps.edn +++ b/deps.edn @@ -10,4 +10,5 @@ :test {:extra-paths ["test"] :extra-deps {org.clojure/test.check {:mvn/version "1.1.1"} io.github.cognitect-labs/test-runner - {:git/tag "v0.5.0" :git/sha "48c3c67"}}}}} + {:git/tag "v0.5.0" :git/sha "48c3c67"}} + :main-opts ["-e" "(set! *warn-on-reflection* true)"]}}} diff --git a/src/wkok/openai_clojure/sse.clj b/src/wkok/openai_clojure/sse.clj index d40f9f7..e2c006c 100644 --- a/src/wkok/openai_clojure/sse.clj +++ b/src/wkok/openai_clojure/sse.clj @@ -85,7 +85,7 @@ data (slurp (byte-array next-byte-coll))] (if-let [es (not-empty (re-seq event-mask data))] (if (every? true? (map #(a/>!! events %) es)) - (recur (drop (apply + (map #(count (.getBytes %)) es)) + (recur (drop (apply + (map #(count (.getBytes ^String %)) es)) next-byte-coll)) ;; Output stream closed, exiting read-loop