Skip to content

der: make Length a newtype of usize #1954

@tarcieri

Description

@tarcieri

Length is currently a newtype of u32. This is because the Decode and Encode impls are specialized to 32-bit integers:

If the implementation could support any usize, we could change the internal type to usize which would allow infallible conversions to/from usize.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions