Merge #67
67: Miscellaneous tweaks regarding no_std r=cuviper a=cuviper Co-authored-by: Josh Stone <cuviper@gmail.com>
This commit is contained in:
commit
c3feb40897
|
@ -4,13 +4,16 @@ description = "Numeric traits for generic mathematics"
|
||||||
documentation = "https://docs.rs/num-traits"
|
documentation = "https://docs.rs/num-traits"
|
||||||
homepage = "https://github.com/rust-num/num-traits"
|
homepage = "https://github.com/rust-num/num-traits"
|
||||||
keywords = ["mathematics", "numerics"]
|
keywords = ["mathematics", "numerics"]
|
||||||
categories = [ "algorithms", "science" ]
|
categories = ["algorithms", "science", "no-std"]
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
repository = "https://github.com/rust-num/num-traits"
|
repository = "https://github.com/rust-num/num-traits"
|
||||||
name = "num-traits"
|
name = "num-traits"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
|
@ -34,7 +34,9 @@ default-features = false
|
||||||
```
|
```
|
||||||
|
|
||||||
The `Float` and `Real` traits are only available when `std` is enabled. The
|
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.
|
Implementations for `i128` and `u128` are only available when `i128` is enabled.
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
|
|
||||||
#![deny(unconditional_recursion)]
|
#![deny(unconditional_recursion)]
|
||||||
|
|
||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![no_std]
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
extern crate core;
|
extern crate std;
|
||||||
|
|
||||||
use core::ops::{Add, Sub, Mul, Div, Rem};
|
use core::ops::{Add, Sub, Mul, Div, Rem};
|
||||||
use core::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
|
use core::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
|
||||||
|
|
Loading…
Reference in New Issue