Skip to content

Commit e3e1f0a

Browse files
committed
replace cond to when
1 parent cb9f987 commit e3e1f0a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/lambdaisland/deep_diff2/manipulate.cljc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@
3131
(postwalk
3232
(fn [x]
3333
(cond
34-
(map-entry? x) (cond
35-
(diff-item? (key x)) (do
36-
;(println "cond 1, keep" x)
37-
x)
38-
(has-diff-item? (val x)) (do
39-
;(println "cond 2, keep" x)
40-
x))
34+
(map-entry? x) (when ;; Either k or v of a map-entry contains/is? diff-item,
35+
;; keep the map-entry. Otherwise, remove it.
36+
(or (diff-item? (key x))
37+
(has-diff-item? (val x)))
38+
x)
4139
:else x))
4240
diff))
4341

0 commit comments

Comments
 (0)