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] compile (fn [[path data] opts scope]
(interceptor/compile-result [path data] opts scope)) (interceptor/compile-result [path data] opts scope))
->endpoint (fn [p d m s] ->endpoint (fn [p d m s]
(let [d (ring/-compile-coercion d)] (let [d (ring/-compile-coercion d)
(let [compiled (compile [p d] opts s)] compiled (compile [p d] opts s)]
(-> compiled (-> compiled
(map->Endpoint) (map->Endpoint)
(assoc :path p) (assoc :path p)
(assoc :method m))))) (assoc :method m))))
->methods (fn [any? data] ->methods (fn [any? data]
(reduce (reduce
(fn [acc method] (fn [acc method]

View file

@ -308,10 +308,10 @@
["/ping" {:get {:interceptors [{:enter #(a/go %)}] ["/ping" {:get {:interceptors [{:enter #(a/go %)}]
:handler (fn [_] (a/go response))}}]) :handler (fn [_] (a/go response))}}])
(ring/create-default-handler) (ring/create-default-handler)
{:executor sieppari/executor})] {:executor sieppari/executor})
(let [respond (promise)] respond (promise)]
(app {:request-method :get, :uri "/ping"} respond ::irrelevant) (app {:request-method :get, :uri "/ping"} respond ::irrelevant)
(is (= response (deref respond 100 ::timeout))))))) (is (= response (deref respond 100 ::timeout))))))
(defrecord MyAsyncContext []) (defrecord MyAsyncContext [])