File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -393,8 +393,8 @@ specified, return speced vars from all namespaces."
393
393
394
394
(defmacro instrument
395
395
" Instruments the var at v, a var or symbol, to check specs
396
- registered with fdef. Wraps the fn at v to check :args/:ret/:fn
397
- specs , if they exist, throwing an ex-info with explain-data if a
396
+ registered with fdef. Wraps the fn at v to check :args
397
+ spec , if it exist, throwing an ex-info with explain-data if a
398
398
check fails. Idempotent."
399
399
[v]
400
400
(let [v (if-not (seq? v) (list 'var v) v)
Original file line number Diff line number Diff line change 293
293
(if *instrument-enabled*
294
294
(s/with-instrument-disabled
295
295
(let [specs (fn-spec v)]
296
- (let [cargs (when (:args specs) (conform! v :args (:args specs) args args))
297
- ret (binding [*instrument-enabled* true ]
298
- (apply f args))
299
- cret (when (:ret specs) (conform! v :ret (:ret specs) ret args))]
300
- (when (c/and (:args specs) (:ret specs) (:fn specs))
301
- (conform! v :fn (:fn specs) {:args cargs :ret cret} args))
302
- ret)))
296
+ (when (:args specs) (conform! v :args (:args specs) args args))
297
+ (binding [*instrument-enabled* true ]
298
+ (apply f args))))
303
299
(apply f args)))
304
300
(not (instance? MultiFn f)) (doto (gobj/extend f)))))
305
301
You can’t perform that action at this time.
0 commit comments