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

re-export num_traits #290

Open
benma opened this issue Feb 4, 2024 · 1 comment
Open

re-export num_traits #290

benma opened this issue Feb 4, 2024 · 1 comment

Comments

@benma
Copy link

benma commented Feb 4, 2024

BigUint::from_str_radix("aa", 16)

results in

help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
1   + use num_traits::Num;

So I need to add another explicit dependency num_traits and worry about setting its version correctly.

It would be great UX if the crate re-exported it and I could do:

use num_bigint::num_traits::Num;
@cuviper
Copy link
Member

cuviper commented Feb 11, 2024

I don't love the idea of re-exporting all of num-traits, as there's a lot that has nothing to do with this crate, but that puts it all in the public API. It should only be a public dependency with respect to the traits we implement.

I wonder if there's any precedent for something like mod ext with re-exports of specific items?

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

2 participants