Skip to content

Commit

Permalink
removing unnecessary branch in cond comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
wandersoncferreira committed Apr 5, 2020
1 parent c627300 commit ce88495
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/spec_tools/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,9 @@
(fn [v item]
(let [transformed (accept item v options)
valid? (valid-spec item transformed)]
(cond
valid? (reduced transformed)
(not valid?) transformed
:else (reduced transformed))))
(if valid?
(reduced transformed)
transformed)))
value items))

(defmethod walk :and [{:keys [::parse/items]} value accept options]
Expand Down

0 comments on commit ce88495

Please sign in to comment.