rust-num / num-bigint

Big integer types for Rust
Apache License 2.0
538 stars 187 forks source link

re-export num_traits #290

Open benma opened 8 months ago

benma commented 8 months ago

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 commented 8 months ago

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?