You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
policy: unwrap a few impossible error cases in compile_tr
We have a few error returns that are impossible to hit:
* A sanity check on a tapleaf that just came out of the compiler
(if this is hit it is a compiler bug and we want to know about it).
* An error return from with_huffman_tree which can only happen if it's
given an empty input (impossible)
* An error if the final compilation (all tapleaves assembled into a tree)
can't fit into a Descriptor::tr; but again, this is a compiler bug if
we hit it. (Actually, I think that by manually constructing a policy
that exceeds the maximum recursion depth you can trigger this error
path, but the compiler output is not the place to flag this manual
violation of invariants).
The next commit will clean up the error types. These changes are in
their own commit because they are potentially controversial.
0 commit comments