num-bigint icon indicating copy to clipboard operation
num-bigint copied to clipboard

re-export num_traits

Open benma opened this issue 1 year ago • 1 comments

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;

benma avatar Feb 04 '24 21:02 benma

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?

cuviper avatar Feb 11 '24 06:02 cuviper