Skip to content

Commit 05d0454

Browse files
ivarrefmartinklepsch
authored andcommitted
Add type hints for GraalVM (#2)
1 parent c6c3d61 commit 05d0454

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/clj_http/lite/util.clj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
(defn url-decode
2020
"Returns the form-url-decoded version of the given string, using either a
2121
specified encoding or UTF-8 by default."
22-
[encoded & [encoding]]
23-
(URLDecoder/decode encoded (or encoding "UTF-8")))
22+
[^String encoded & [encoding]]
23+
(let [^String encoding (or encoding "UTF-8")]
24+
(URLDecoder/decode encoded encoding)))
2425

2526
(defn url-encode
2627
"Returns an UTF-8 URL encoded version of the given string."
27-
[unencoded]
28+
[^String unencoded]
2829
(URLEncoder/encode unencoded "UTF-8"))
2930

3031
(defmacro base64-encode

0 commit comments

Comments
 (0)