Skip to content

Commit

Permalink
[#289] [fix] Typo in hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaoussanis committed Oct 24, 2023
1 parent 273c62e commit be9d4cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/taoensso/carmine.clj
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,17 @@
([x & [kf vf]]
(if (empty? x)
{}
(let [kf (case kf nil (fn [_ v] v) kf)
vf (case vf nil (fn [k _] k) :keywordize (fn [k _] (keyword k)) vf)]
(let [kf (case kf nil (fn [k _] k) :keywordize (fn [k _] (keyword k)) kf)
vf (case vf nil (fn [_ v] v) vf)]
(persistent!
(enc/reduce-kvs
(fn [m k v] (assoc! m (kf k v) (vf k v)))
(transient {}) x))))))

(comment
(as-map ["k1" "v1" "k2" "v2"] :keywordize nil)
(as-map ["k1" "v1" "k2" "v2"] nil (fn [_ v] (str/upper-case v))))

(enc/defalias parse protocol/parse)
(enc/defalias parser-comp protocol/parser-comp)
(enc/defalias parse-raw protocol/parse-raw)
Expand Down

0 comments on commit be9d4cd

Please sign in to comment.