refactor: Remove redundant let

This commit is contained in:
Mathieu Lirzin 2026-01-01 15:55:25 +01:00
parent 3191d9ee59
commit e6137cb47a
No known key found for this signature in database
GPG key ID: 0ADEE10094604D37
2 changed files with 10 additions and 10 deletions

View file

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

View file

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