mirror of
https://github.com/metosin/reitit.git
synced 2025-12-22 18:41:10 +00:00
Apply a change suggested by Miikka Koskinen.
This commit is contained in:
parent
b77115850f
commit
fdf249a959
1 changed files with 8 additions and 10 deletions
|
|
@ -66,16 +66,14 @@
|
||||||
coerce (into [] (keep #(coerce % opts)))))
|
coerce (into [] (keep #(coerce % opts)))))
|
||||||
|
|
||||||
(defn path-conflicting-routes [routes]
|
(defn path-conflicting-routes [routes]
|
||||||
(let [conflicting-routes
|
(-> (into {}
|
||||||
(into {}
|
(comp (map-indexed (fn [index route]
|
||||||
(comp (map-indexed (fn [index route]
|
[route (into #{}
|
||||||
[route (into #{}
|
(filter #(impl/conflicting-routes? route %))
|
||||||
(filter #(impl/conflicting-routes? route %))
|
(subvec routes (inc index)))]))
|
||||||
(subvec routes (inc index)))]))
|
(filter (comp seq second)))
|
||||||
(filter (comp seq second)))
|
routes)
|
||||||
routes)]
|
(not-empty)))
|
||||||
(when (seq conflicting-routes)
|
|
||||||
conflicting-routes)))
|
|
||||||
|
|
||||||
(defn conflicting-paths [conflicts]
|
(defn conflicting-paths [conflicts]
|
||||||
(->> (for [[p pc] conflicts]
|
(->> (for [[p pc] conflicts]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue