Skip to content

Remove the alloc feature for the HexPrimitive format helper #5469

@mpbagot

Description

@mpbagot

Once #5381 merges, we'll have a helper type HexPrimitive in primitives that provides default implementations of FromStr, UpperHex, LowerHex and Display for consensus encodable primitive types. This helper currently requires alloc for both encoding and decoding, which limits its use for no-alloc types like Header.

This issue involves reworking the encoding and decoding logic in HexPrimitive to remove the alloc requirement entirely.
As an extension, types like Header can have the alloc feature gate removed on the UpperHex and LowerHex implementations once the first step is complete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions