Simplify during*
This commit is contained in:
parent
2f4525b031
commit
b5c57381fa
|
@ -239,23 +239,14 @@
|
|||
(entity #:name name
|
||||
#:assert
|
||||
(lambda (value handle)
|
||||
(let ((facet (react (facet-prevent-inert-check! this-facet)
|
||||
(f value))))
|
||||
(match (hash-ref assertion-map handle #f)
|
||||
[#f
|
||||
(hash-set! assertion-map handle facet)]
|
||||
['dead
|
||||
(hash-remove! assertion-map handle)
|
||||
(stop-facet facet)]
|
||||
[_
|
||||
(error 'during "Duplicate assertion handle ~a" handle)])))
|
||||
(hash-set! assertion-map
|
||||
handle
|
||||
(react (facet-prevent-inert-check! this-facet)
|
||||
(f value))))
|
||||
#:retract
|
||||
(lambda (handle)
|
||||
(match (hash-ref assertion-map handle #f)
|
||||
[#f
|
||||
(hash-set! assertion-map handle 'dead)]
|
||||
['dead
|
||||
(error 'during "Duplicate retraction handle ~a" handle)]
|
||||
[#f (void)]
|
||||
[facet
|
||||
(hash-remove! assertion-map handle)
|
||||
(stop-facet facet)]))))
|
||||
|
|
Loading…
Reference in New Issue