add experimental feature num-traits
This commit is contained in:
parent
fcdd018240
commit
edbec7062a
|
@ -28,6 +28,7 @@ std = []
|
|||
typenum = "1.10"
|
||||
az = { version = "1", optional = true }
|
||||
half = { version = "1.6", optional = true }
|
||||
num-traits = { version = "0.2.12", default-features = false, optional = true }
|
||||
serde = { version = "1.0.60", default-features = false, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
|
@ -37,7 +38,7 @@ criterion = "0.3"
|
|||
num-traits = { version = "0.2", default-features = false }
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = ["az", "f16", "serde", "std"]
|
||||
features = ["az", "f16", "num-traits", "serde", "std"]
|
||||
|
||||
[[bench]]
|
||||
name = "bench_main"
|
||||
|
|
13
README.md
13
README.md
|
@ -192,6 +192,18 @@ version = "1"
|
|||
features = ["f16", "serde"]
|
||||
```
|
||||
|
||||
## Experimental optional features
|
||||
|
||||
It is not considered a breaking change if experimental features are
|
||||
removed. The removal of experimental features would however require a
|
||||
minor version bump. Similarly, on a minor version bump, optional
|
||||
dependencies can be updated to an incompatible newer version.
|
||||
|
||||
There is one experimental feature:
|
||||
|
||||
1. `num-traits`, disabled by default. This implements some traits
|
||||
from the [*num-traits* crate] .
|
||||
|
||||
## License
|
||||
|
||||
This crate is free software: you can redistribute it and/or modify it
|
||||
|
@ -214,6 +226,7 @@ additional terms or conditions.
|
|||
[*fixed* crate]: https://crates.io/crates/fixed
|
||||
[*fixed-sqrt* crate]: https://crates.io/crates/fixed-sqrt
|
||||
[*half* crate]: https://crates.io/crates/half
|
||||
[*num-traits* crate]: https://crates.io/crates/num-traits
|
||||
[*serde* crate]: https://crates.io/crates/serde
|
||||
[*typenum* crate]: https://crates.io/crates/typenum
|
||||
[LICENSE-APACHE]: https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright © 2018–2020 Trevor Spiteri
|
||||
|
||||
// This library is free software: you can redistribute it and/or
|
||||
// modify it under the terms of either
|
||||
//
|
||||
// * the Apache License, Version 2.0 or
|
||||
// * the MIT License
|
||||
//
|
||||
// at your option.
|
||||
//
|
||||
// You should have recieved copies of the Apache License and the MIT
|
||||
// License along with the library. If not, see
|
||||
// <https://www.apache.org/licenses/LICENSE-2.0> and
|
||||
// <https://opensource.org/licenses/MIT>.
|
15
src/lib.rs
15
src/lib.rs
|
@ -176,6 +176,18 @@ version = "1"
|
|||
features = ["f16", "serde"]
|
||||
```
|
||||
|
||||
## Experimental optional features
|
||||
|
||||
It is not considered a breaking change if experimental features are
|
||||
removed. The removal of experimental features would however require a
|
||||
minor version bump. Similarly, on a minor version bump, optional
|
||||
dependencies can be updated to an incompatible newer version.
|
||||
|
||||
There is one experimental feature:
|
||||
|
||||
1. `num-traits`, disabled by default. This implements some traits
|
||||
from the [*num-traits* crate] .
|
||||
|
||||
## License
|
||||
|
||||
This crate is free software: you can redistribute it and/or modify it
|
||||
|
@ -198,6 +210,7 @@ additional terms or conditions.
|
|||
[*fixed* crate]: https://crates.io/crates/fixed
|
||||
[*fixed-sqrt* crate]: https://crates.io/crates/fixed-sqrt
|
||||
[*half* crate]: https://crates.io/crates/half
|
||||
[*num-traits* crate]: https://crates.io/crates/num-traits
|
||||
[*serde* crate]: https://crates.io/crates/serde
|
||||
[*typenum* crate]: https://crates.io/crates/typenum
|
||||
[LICENSE-APACHE]: https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
@ -265,6 +278,8 @@ mod display;
|
|||
mod float_helper;
|
||||
mod from_str;
|
||||
mod helpers;
|
||||
#[cfg(feature = "num-traits")]
|
||||
mod impl_num_traits;
|
||||
mod int_helper;
|
||||
mod log10;
|
||||
#[cfg(feature = "serde")]
|
||||
|
|
Loading…
Reference in New Issue