Skip to content

Allow for array sizing using consts #109

Description

@cujomalainey

Consts can't be used for array sizing. e.g.

const SIZE: usize = 4;

#[derive(PackedStruct)]
#[packed_struct(bit_numbering = "msb0", endian = "lsb", size_bytes = "4")]
struct A {
  b: [u8; SIZE],
}

Which returns error: Unsupported extraction of int value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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