From 89e30d8bf9978f2c060870a1587a4cadfd899f17 Mon Sep 17 00:00:00 2001 From: Max Countryman Date: Wed, 18 Dec 2013 08:28:54 -0800 Subject: [PATCH] http `encode-bytes` type hinting --- src/skuld/http.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/skuld/http.clj b/src/skuld/http.clj index 9b280dc..8a3fffc 100644 --- a/src/skuld/http.clj +++ b/src/skuld/http.clj @@ -17,7 +17,8 @@ (defn- encode-bytes "Encode a bytes to the json generator." [^Bytes b ^JsonGenerator jg] - (.writeString jg (-> ^Bytes b .bytes b64/encode String.))) + (let [encoded (-> b .bytes b64/encode)] + (.writeString jg (String. ^String encoded)))) ;; Custom Cheshire encoder for the Bytes type (add-encoder Bytes encode-bytes)