67: Miscellaneous tweaks regarding no_std r=cuviper a=cuviper



Co-authored-by: Josh Stone <cuviper@gmail.com>
This commit is contained in:
bors[bot] 2018-05-09 00:40:06 +00:00
commit c3feb40897
3 changed files with 9 additions and 4 deletions

View File

@ -4,13 +4,16 @@ description = "Numeric traits for generic mathematics"
documentation = "https://docs.rs/num-traits"
homepage = "https://github.com/rust-num/num-traits"
keywords = ["mathematics", "numerics"]
categories = [ "algorithms", "science" ]
categories = ["algorithms", "science", "no-std"]
license = "MIT/Apache-2.0"
repository = "https://github.com/rust-num/num-traits"
name = "num-traits"
version = "0.2.2"
readme = "README.md"
[package.metadata.docs.rs]
all-features = true
[dependencies]
[features]

View File

@ -34,7 +34,9 @@ default-features = false
```
The `Float` and `Real` traits are only available when `std` is enabled. The
`FloatCore` trait is always available.
`FloatCore` trait is always available. `MulAdd` and `MulAddAssign` for `f32`
and `f64` also require `std`, as do implementations of signed and floating-
point exponents in `Pow`.
Implementations for `i128` and `u128` are only available when `i128` is enabled.

View File

@ -18,9 +18,9 @@
#![deny(unconditional_recursion)]
#![cfg_attr(not(feature = "std"), no_std)]
#![no_std]
#[cfg(feature = "std")]
extern crate core;
extern crate std;
use core::ops::{Add, Sub, Mul, Div, Rem};
use core::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};