Skip to content

Move traits into num-traits crate #174

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ complex, rational, range iterators, generic integers, and more!
"""

[dependencies]
num-traits = { path = "traits" }
rand = { version = "0.3.8", optional = true }
rustc-serialize = { version = "0.3.13", optional = true }
serde = { version = "^0.7.0", optional = true }
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ extern crate rand;
#[cfg(feature = "serde")]
extern crate serde;

extern crate num_traits;
// Allow existing code to access traits without changes.
pub use num_traits as traits;

#[cfg(feature = "bigint")]
pub use bigint::{BigInt, BigUint};
#[cfg(feature = "rational")]
Expand All @@ -92,7 +96,6 @@ pub mod bigint;
pub mod complex;
pub mod integer;
pub mod iter;
pub mod traits;
#[cfg(feature = "rational")]
pub mod rational;

Expand Down
13 changes: 13 additions & 0 deletions traits/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "num-traits"
version = "0.1.0"
authors = ["The Rust Project Developers"]
license = "MIT/Apache-2.0"
homepage = "https://github.com/rust-num/num"
repository = "https://github.com/rust-num/num"
documentation = "http://rust-num.github.io/num"
keywords = ["mathematics", "numerics", "traits"]
description = """
A collection of traits for Rust, including implementations on Rust's built-in
numeric types.
"""
File renamed without changes.