Closed geonnave closed 10 months ago
By the way, the MessageBuffer is at this point pretty much a re-implementation of heapless::Vec. If hacspec grows well, it may be possible to just swap that in at some point. (That'd work best when all direct access to content has been removed, which AIU we currently do for efficiency reasons -- thus, it may take some time until we can do that, for may require placement return).
.as_slice()
instead ofbuffer.content[..buffer.len]
fill_with_slice(slice)
instead ofbuffer[..buffer.len].copy_from_slice(slice)
This introduces some unwrap calls which should not fail, and I hope it could be guaranteed by hax. If not then it can be reworked.
Deliberately not being exhaustive in the calls to
.content[]
within parsing routines. In this case, we also expect to have proofs from hax.