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)))))
|
||||
|
||||
(defn path-conflicting-routes [routes]
|
||||
(let [conflicting-routes
|
||||
(into {}
|
||||
(-> (into {}
|
||||
(comp (map-indexed (fn [index route]
|
||||
[route (into #{}
|
||||
(filter #(impl/conflicting-routes? route %))
|
||||
(subvec routes (inc index)))]))
|
||||
(filter (comp seq second)))
|
||||
routes)]
|
||||
(when (seq conflicting-routes)
|
||||
conflicting-routes)))
|
||||
routes)
|
||||
(not-empty)))
|
||||
|
||||
(defn conflicting-paths [conflicts]
|
||||
(->> (for [[p pc] conflicts]
|
||||
|
|
|
|||
Loading…
Reference in a new issue