mirror of
https://github.com/metosin/reitit.git
synced 2026-02-06 20:13:11 +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 (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))))
|
(nth +percents+ (if (< byte 0) (+ 256 byte) byte))))
|
||||||
|
|
||||||
#?(:clj (defn percent-encode [^String s]
|
#?(:clj (defn percent-encode [^String s]
|
||||||
|
|
|
||||||
|
|
@ -83,8 +83,8 @@
|
||||||
(if-not compile
|
(if-not compile
|
||||||
this
|
this
|
||||||
(let [compiled (::compiled opts 0)
|
(let [compiled (::compiled opts 0)
|
||||||
opts (assoc opts ::compiled (inc compiled))]
|
opts (assoc opts ::compiled (inc ^long compiled))]
|
||||||
(when (>= compiled *max-compile-depth*)
|
(when (>= ^long compiled ^long *max-compile-depth*)
|
||||||
(throw
|
(throw
|
||||||
(ex-info
|
(ex-info
|
||||||
(str "Too deep Interceptor compilation - " compiled)
|
(str "Too deep Interceptor compilation - " compiled)
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,8 @@
|
||||||
(if-not compile
|
(if-not compile
|
||||||
this
|
this
|
||||||
(let [compiled (::compiled opts 0)
|
(let [compiled (::compiled opts 0)
|
||||||
opts (assoc opts ::compiled (inc compiled))]
|
opts (assoc opts ::compiled (inc ^long compiled))]
|
||||||
(when (>= compiled *max-compile-depth*)
|
(when (>= ^long compiled ^long *max-compile-depth*)
|
||||||
(throw
|
(throw
|
||||||
(ex-info
|
(ex-info
|
||||||
(str "Too deep Middleware compilation - " compiled)
|
(str "Too deep Middleware compilation - " compiled)
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
(defn compile [trie]
|
(defn compile [trie]
|
||||||
"Compiles the Trie so that [[lookup]] can be used."
|
"Compiles the Trie so that [[lookup]] can be used."
|
||||||
#?(:cljs trie
|
#?(:cljs trie
|
||||||
:clj (.matcher ^SegmentTrie (or trie (SegmentTrie.)))))
|
:clj (.matcher (or ^SegmentTrie trie (SegmentTrie.)))))
|
||||||
|
|
||||||
(defn scanner [compiled-tries]
|
(defn scanner [compiled-tries]
|
||||||
"Returns a new compiled trie that does linear scan on the given compiled tries on [[lookup]]."
|
"Returns a new compiled trie that does linear scan on the given compiled tries on [[lookup]]."
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue