Apply a change suggested by Miikka Koskinen.

This commit is contained in:
Vincent Cantin 2019-01-22 08:22:48 +08:00
parent b77115850f
commit fdf249a959

View file

@ -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]