Skip to content

Implement conversion traits based on integer size #3

@isaacholt100

Description

@isaacholt100

Current behaviour is that From<uN> is implemented for all sizes of BUint<N>, but if e.g. a. U80 was created (with the u8_digit Cargo feature enabled), then this would not be ideal, as From<u128> could fail, and so the conversion trait should be TryFrom instead.

This could be implemented using bounds on N, but unfortunately it would rely on the unstable and incomplete nightly feature generic_const_exprs. For now, I think that is the only solution.

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