           (cond
 
             (and bracket? (= \{ c))
-            (let [to' (or (str/index-of s "}" to) (ex/fail! ::unclosed-brackets {:path s}))]
+            (let [^long to' (or (str/index-of s "}" to) (ex/fail! ::unclosed-brackets {:path s}))]
               (if (= \* (get s (inc to)))
                 (recur (concat ss (-static from to) (-catch-all (inc to) to')) (long (inc to')) (long (inc to')))
                 (recur (concat ss (-static from to) (-wild to to')) (long (inc to')) (long (inc to')))))
 
             (and colon? (= \: c))
-            (let [to' (or (str/index-of s "/" to) (count s))]
+            (let [^long to' (or (str/index-of s "/" to) (count s))]
               (if (= 1 (- to' to))
                 (recur ss from (inc to))
                 (recur (concat ss (-static from to) (-wild to to')) (long to') (long to'))))

        :else (recur (inc i))))))

(defn- -keyword [s]
  (if-let [i (str/index-of s "/")]
    (keyword (subs s 0 i) (subs s (inc i)))
    (keyword s)))


      (let [match (->Match params data)]
        (reify Matcher
          (match [_ i max path]
            (if (<= ^long i ^long max) (assoc-param match key (decode path i max true))))
          (view [_] [key [data]])
          (depth [_] 1)
          (length [_]))))
