Ah, yes. It would have helped if I read the all the changes :-)
Instead of the match, you can also use NonZeroU8. And encode it as len + 1. (i.e., non_zero_len==1 represents an actual length of 0). Implication is you can't represent a length of 255. (Or more generally create a NonMaxU8 struct that uses NonZero internally ¯_(ツ)_/¯
Originally posted by @gregor-cf in cloudflare/quiche#2460 (comment)
Ah, yes. It would have helped if I read the all the changes :-)
Instead of the match, you can also use
NonZeroU8. And encode it aslen + 1. (i.e., non_zero_len==1 represents an actual length of 0). Implication is you can't represent a length of 255. (Or more generally create aNonMaxU8struct that uses NonZero internally ¯_(ツ)_/¯Originally posted by @gregor-cf in cloudflare/quiche#2460 (comment)