Skip to content

Commit dc3f22a

Browse files
committed
a bit of cleanup
1 parent cc69dd0 commit dc3f22a

4 files changed

Lines changed: 3 additions & 3 deletions

File tree

pixie/channels.pxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
(-take! c (->AltHandler handler-atom f)))))
178178
nil
179179
ops)
180-
(when (and (:default options)
180+
(when (and (contains? options :default)
181181
(not @handler-atom))
182182
(reset! handler-atom true)
183183
(st/-run-later (partial k [:default (:default options)])))))

pixie/csp.pxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
(defn alts!
5757
([ops]
5858
(st/call-cc (fn [k]
59-
(chans/alts! ops (partial st/run-and-process k) {}))))
59+
(chans/alts! ops (partial st/run-and-process k) nil))))
6060
([ops & opts]
6161
(st/call-cc (fn [k]
6262
(chans/alts! ops (partial st/run-and-process k) (apply hashmap opts))))))

pixie/stdlib.pxi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@
292292
(extend -with-meta Nil (fn [self _] nil))
293293
(extend -at-end? Nil (fn [_] true))
294294
(extend -deref Nil (fn [_] nil))
295+
(extend -contains-key Nil (fn [_ _] false))
295296

296297
(extend -hash Integer hash-int)
297298

tests/pixie/tests/test-csp.pxi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
(alts! [c1 c2])))]
2424
(>! c1 1)
2525
(>! c2 2)
26-
(println (hash-set [c1 1] [c2 2]))
2726
(assert (not (= c1 c2)))
2827
(assert= (<! results) #{[c1 1] [c2 2]})))
2928

0 commit comments

Comments
 (0)