mirror of
https://github.com/metosin/reitit.git
synced 2025-12-26 11:38:26 +00:00
Fix reflection & boxed-math warning, fixes #207
This commit is contained in:
parent
d203832667
commit
1e7b118ce4
4 changed files with 6 additions and 6 deletions
|
|
@ -149,7 +149,7 @@
|
|||
|
||||
#?(:clj (def +percents+ (into [] (map #(format "%%%02X" %) (range 0 256)))))
|
||||
|
||||
#?(:clj (defn byte->percent [byte]
|
||||
#?(:clj (defn byte->percent [^long byte]
|
||||
(nth +percents+ (if (< byte 0) (+ 256 byte) byte))))
|
||||
|
||||
#?(:clj (defn percent-encode [^String s]
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@
|
|||
(if-not compile
|
||||
this
|
||||
(let [compiled (::compiled opts 0)
|
||||
opts (assoc opts ::compiled (inc compiled))]
|
||||
(when (>= compiled *max-compile-depth*)
|
||||
opts (assoc opts ::compiled (inc ^long compiled))]
|
||||
(when (>= ^long compiled ^long *max-compile-depth*)
|
||||
(throw
|
||||
(ex-info
|
||||
(str "Too deep Interceptor compilation - " compiled)
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@
|
|||
(if-not compile
|
||||
this
|
||||
(let [compiled (::compiled opts 0)
|
||||
opts (assoc opts ::compiled (inc compiled))]
|
||||
(when (>= compiled *max-compile-depth*)
|
||||
opts (assoc opts ::compiled (inc ^long compiled))]
|
||||
(when (>= ^long compiled ^long *max-compile-depth*)
|
||||
(throw
|
||||
(ex-info
|
||||
(str "Too deep Middleware compilation - " compiled)
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
(defn compile [trie]
|
||||
"Compiles the Trie so that [[lookup]] can be used."
|
||||
#?(:cljs trie
|
||||
:clj (.matcher ^SegmentTrie (or trie (SegmentTrie.)))))
|
||||
:clj (.matcher (or ^SegmentTrie trie (SegmentTrie.)))))
|
||||
|
||||
(defn scanner [compiled-tries]
|
||||
"Returns a new compiled trie that does linear scan on the given compiled tries on [[lookup]]."
|
||||
|
|
|
|||
Loading…
Reference in a new issue