Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement conversion traits based on integer size #3

Open
isaacholt100 opened this issue Jun 21, 2022 · 0 comments
Open

Implement conversion traits based on integer size #3

isaacholt100 opened this issue Jun 21, 2022 · 0 comments

Comments

@isaacholt100
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant