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:
Rohit Aggarwal 2014-04-01 14:30:37 +01:00
parent 7aa5e24a38
commit 420f4190d6
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@
(let [[name [params & sigs]] (encore/name-with-attrs name sigs)
prepost-map (when (and (map? (first sigs)) (next sigs)) (first sigs))
body (if prepost-map (next sigs) sigs)]
`(defn ~name ~params ~prepost-map
`(defn ~name ~params ~(or prepost-map {})
(pspy ~(clojure.core/name name)
~@body))))