-
Notifications
You must be signed in to change notification settings - Fork 146
der: add indefinite length #1820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
der: add indefinite length #1820
Conversation
I've been trying to work on indefinite lengths but in a way that avoids the need to have dummy lengths or an |
I tried a trick with |
Because /// This enum is 4 bytes
enum LengthInner {
Definite(NonZero<u32>),
Indefinite,
} |
@dishmaker that enum looks a lot like |
Yeah, so we need |
@dishmaker I definitely don't want to pull in an extra dependency for that. The newtype can enforce its own maximum like it did before #1726 |
0b79ef6
to
47a1cd9
Compare
We can use
u32::MAX
as indefinite variant