4bbc34b083
num: remove `pub` from sub-crates Rust 1.4 through 1.7 will issue warnings that `pub extern crate` does not work as expected, although it appears to be fine. But Rust 1.8 and later issue `#[warn(private_in_public)]` for `pub use num_foo as foo` if that crate isn't public, and that's headed toward a hard error. @bluss suggested instead `pub mod foo { pub use num_foo::*; }`, which I thought I had tried before, but it appears to work fine on all versions of Rust. Let's do it! A small downside is that docs for `num::foo` now just show the wildcard reexport, instead of direct documentation, but at least there's a link to follow to the sub-crate. It's a breaking change that `num::num_foo` paths are no longer public, but we didn't really want those exposed in the first place. I consider this minor -- people should either use the `num::foo` module as before the split-up, or use the `num_foo` crate directly. Fixes #189. |
||
---|---|---|
.travis | ||
benches | ||
bigint | ||
complex | ||
doc | ||
integer | ||
iter | ||
macros | ||
rational | ||
src | ||
traits | ||
.gitignore | ||
.multirust.sh | ||
.travis.yml | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
Makefile | ||
README.md |
README.md
num
A collection of numeric types and traits for Rust.
This includes new types for big integers, rationals, and complex numbers, new traits for generic programming on numeric properties like `Integer, and generic range iterators.
Usage
Add this to your Cargo.toml
:
[dependencies]
num = "0.1"
and this to your crate root:
extern crate num;