Actually use current-value->placeholder
This commit is contained in:
parent
79af429b58
commit
27ac21bed1
|
@ -143,6 +143,10 @@
|
|||
(encode-array-like 0 (cons key fields)))
|
||||
|
||||
(define (encode-value v)
|
||||
(match ((current-value->placeholder) v)
|
||||
[(? integer? n)
|
||||
(bit-string (#b0001 :: bits 4) (n :: (wire-length)))]
|
||||
[#f
|
||||
(match v
|
||||
[#f (bytes #b00000000)]
|
||||
[#t (bytes #b00000001)]
|
||||
|
@ -180,7 +184,7 @@
|
|||
[(? set?) (encode-array-like 2 (set->list v))]
|
||||
[(? dict?) (encode-array-like 3 (dict-keys-and-values v))]
|
||||
|
||||
[_ (error 'encode-value "Cannot encode value ~v" v)]))
|
||||
[_ (error 'encode-value "Cannot encode value ~v" v)])]))
|
||||
|
||||
;;---------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue