Skip to content

Seeing a panic where a try_from ought simply return an error #62

@nathanielmanistaatgoogle

Description

In a test I recently wrote

assert!(bnum::BUintD8::<3>::try_from(0x1000000).is_err());

and what I'm seeing during execution is that the try_from call panics with index out of bounds: the len is 3 but the index is 3. Oughtn't the try_from terminate by returning an error (thus causing the assert to pass)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions