mirror of https://github.com/status-im/timbre.git
Remove an eastwood warning by turning pre/post map into an empty map if it is nil for the defnp macro.
This commit is contained in:
parent
7aa5e24a38
commit
420f4190d6
|
@ -134,7 +134,7 @@
|
||||||
(let [[name [params & sigs]] (encore/name-with-attrs name sigs)
|
(let [[name [params & sigs]] (encore/name-with-attrs name sigs)
|
||||||
prepost-map (when (and (map? (first sigs)) (next sigs)) (first sigs))
|
prepost-map (when (and (map? (first sigs)) (next sigs)) (first sigs))
|
||||||
body (if prepost-map (next sigs) sigs)]
|
body (if prepost-map (next sigs) sigs)]
|
||||||
`(defn ~name ~params ~prepost-map
|
`(defn ~name ~params ~(or prepost-map {})
|
||||||
(pspy ~(clojure.core/name name)
|
(pspy ~(clojure.core/name name)
|
||||||
~@body))))
|
~@body))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue