Skip to content

Commit 504ac94

Browse files
authored
Merge pull request #43 from mrkam2/patch-1
Replace eval reader form with constant
2 parents dc207a3 + 8ec13b2 commit 504ac94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ring/util/codec.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,10 @@
157157
(recur (f result (.nextToken tokenizer)))
158158
result))))))
159159

160+
(def ^:private ^:const kv-separator (int \=))
161+
160162
(defn- split-key-value-pair [^String s]
161-
(let [i (.indexOf s #=(int \=))]
163+
(let [i (.indexOf s kv-separator)]
162164
(cond
163165
(pos? i) (MapEntry. (.substring s 0 i) (.substring s (inc i)))
164166
(zero? i) (MapEntry. "" (.substring s (inc i)))

0 commit comments

Comments
 (0)