Skip to content

Commit 916b415

Browse files
committed
deps.edn, merge upstream PR #4
1 parent 19f1109 commit 916b415

File tree

4 files changed

+24
-32
lines changed

4 files changed

+24
-32
lines changed

.gitignore

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
/target
2-
/classes
3-
/checkouts
4-
pom.xml
5-
pom.xml.asc
6-
*.jar
7-
*.class
8-
*.iml
9-
/.lein-*
10-
/.nrepl-port
11-
.hgignore
12-
.hg/
13-
.idea
1+
.clj-kondo/
2+
.cpcache/
3+
.lsp/

deps.edn

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{:deps {org.clojure/clojure {:mvn/version "1.11.1"}}
2+
:aliases {:test {:extra-paths ["test"]
3+
:extra-deps {io.github.cognitect-labs/test-runner
4+
{:git/tag "v0.5.1" :git/sha "dfb30dd"}}
5+
:main-opts ["-m" "cognitect.test-runner"]
6+
:exec-fn cognitect.test-runner.api/test}}}

project.clj

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/special/core.cljc

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,23 @@
5353
c must be a keyword."
5454
[condition & [value & {:as handlers}]]
5555
(assert (and (keyword? condition) (not (#{:trace} condition))))
56-
(let [get-h (fn [m k] (if (contains? m k)
57-
(let [h (m k)]
58-
(case h
59-
nil ::nil
60-
false ::false
61-
h))))
56+
(let [get-h #(when (contains? % %2)
57+
(let [x (% %2)]
58+
(case x
59+
nil ::nil
60+
false ::false
61+
x)))
6262
x (or (get-h *-special-condition-handlers-* condition)
6363
(get-h handlers :normally)
6464
(throw (ex-info (str "Unhandled condition " condition)
6565
{::condition condition
6666
:value value})))]
67-
(cond (fn? x) ((if (seq handlers)
68-
(apply manage x (apply concat handlers))
69-
x)
70-
value)
71-
(= ::nil x) nil
72-
(= ::false x) false
73-
:else x)))
67+
(case x
68+
::nil nil
69+
::false false
70+
(if (fn? x)
71+
((if (seq handlers)
72+
(apply manage x (apply concat handlers))
73+
x)
74+
value)
75+
x))))

0 commit comments

Comments
 (0)