From c57d42097393dc671424b10ce74fad726afbd34e Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 8 May 2018 17:47:31 -0700 Subject: [PATCH 1/3] Always use #![no_std], and declare std when enabled --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 8d47294..cd3102d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,9 +16,9 @@ #![doc(html_root_url = "https://docs.rs/num-integer/0.1")] -#![cfg_attr(not(feature = "std"), no_std)] +#![no_std] #[cfg(feature = "std")] -extern crate core; +extern crate std; extern crate num_traits as traits; From ce7384c399df81e2613d12145b00bbb81b095c27 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 8 May 2018 17:48:56 -0700 Subject: [PATCH 2/3] Add the no-std crate category --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index feceae4..377de3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ description = "Integer traits and functions" documentation = "https://docs.rs/num-integer" homepage = "https://github.com/rust-num/num-integer" keywords = ["mathematics", "numerics"] -categories = [ "algorithms", "science" ] +categories = ["algorithms", "science", "no-std"] license = "MIT/Apache-2.0" repository = "https://github.com/rust-num/num-integer" name = "num-integer" From 5cc04e09ba9ffbfcd844aa1aa48adaa0655f891e Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 8 May 2018 17:49:42 -0700 Subject: [PATCH 3/3] Enable all features for docs.rs --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 377de3c..5c743af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,9 @@ name = "num-integer" version = "0.1.36" readme = "README.md" +[package.metadata.docs.rs] +all-features = true + [dependencies.num-traits] version = "0.2.0" default-features = false