mirror of
https://github.com/metosin/reitit.git
synced 2026-01-11 17:39:50 +00:00
refactor: Remove redundant let
This commit is contained in:
parent
3191d9ee59
commit
e6137cb47a
2 changed files with 10 additions and 10 deletions
|
|
@ -22,12 +22,12 @@
|
|||
compile (fn [[path data] opts scope]
|
||||
(interceptor/compile-result [path data] opts scope))
|
||||
->endpoint (fn [p d m s]
|
||||
(let [d (ring/-compile-coercion d)]
|
||||
(let [compiled (compile [p d] opts s)]
|
||||
(-> compiled
|
||||
(map->Endpoint)
|
||||
(assoc :path p)
|
||||
(assoc :method m)))))
|
||||
(let [d (ring/-compile-coercion d)
|
||||
compiled (compile [p d] opts s)]
|
||||
(-> compiled
|
||||
(map->Endpoint)
|
||||
(assoc :path p)
|
||||
(assoc :method m))))
|
||||
->methods (fn [any? data]
|
||||
(reduce
|
||||
(fn [acc method]
|
||||
|
|
|
|||
|
|
@ -308,10 +308,10 @@
|
|||
["/ping" {:get {:interceptors [{:enter #(a/go %)}]
|
||||
:handler (fn [_] (a/go response))}}])
|
||||
(ring/create-default-handler)
|
||||
{:executor sieppari/executor})]
|
||||
(let [respond (promise)]
|
||||
(app {:request-method :get, :uri "/ping"} respond ::irrelevant)
|
||||
(is (= response (deref respond 100 ::timeout)))))))
|
||||
{:executor sieppari/executor})
|
||||
respond (promise)]
|
||||
(app {:request-method :get, :uri "/ping"} respond ::irrelevant)
|
||||
(is (= response (deref respond 100 ::timeout))))))
|
||||
|
||||
(defrecord MyAsyncContext [])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue