Don't depend on serde_derive explicitly.
This commit is contained in:
parent
6300d34356
commit
7c69cbf326
@ -24,7 +24,7 @@ default = [ "std" ]
|
||||
std = [ "matrixmultiply", "rand/std", "rand_distr", "simba/std" ]
|
||||
stdweb = [ "rand/stdweb" ]
|
||||
arbitrary = [ "quickcheck" ]
|
||||
serde-serialize = [ "serde", "serde_derive", "num-complex/serde" ]
|
||||
serde-serialize = [ "serde", "num-complex/serde" ]
|
||||
abomonation-serialize = [ "abomonation" ]
|
||||
sparse = [ ]
|
||||
debug = [ "approx/num-complex", "rand/std" ]
|
||||
@ -44,8 +44,7 @@ simba = { version = "0.1", default-features = false }
|
||||
alga = { version = "0.9", default-features = false, optional = true }
|
||||
rand_distr = { version = "0.2", optional = true }
|
||||
matrixmultiply = { version = "0.2", optional = true }
|
||||
serde = { version = "1.0", optional = true }
|
||||
serde_derive = { version = "1.0", optional = true }
|
||||
serde = { version = "1.0", features = [ "derive" ], optional = true }
|
||||
abomonation = { version = "0.7", optional = true }
|
||||
mint = { version = "0.5", optional = true }
|
||||
quickcheck = { version = "0.9", optional = true }
|
||||
|
14
src/lib.rs
14
src/lib.rs
@ -90,11 +90,9 @@ an optimized set of tools for computer graphics and physics. Those features incl
|
||||
#[cfg(feature = "arbitrary")]
|
||||
extern crate quickcheck;
|
||||
|
||||
#[cfg(feature = "serde")]
|
||||
extern crate serde;
|
||||
#[cfg(feature = "serde")]
|
||||
#[cfg(feature = "serde-serialize")]
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate serde;
|
||||
|
||||
#[cfg(feature = "abomonation-serialize")]
|
||||
extern crate abomonation;
|
||||
@ -190,9 +188,7 @@ pub fn zero<T: Zero>() -> T {
|
||||
/// The range must not be empty.
|
||||
#[inline]
|
||||
pub fn wrap<T>(mut val: T, min: T, max: T) -> T
|
||||
where
|
||||
T: Copy + PartialOrd + ClosedAdd + ClosedSub,
|
||||
{
|
||||
where T: Copy + PartialOrd + ClosedAdd + ClosedSub {
|
||||
assert!(min < max, "Invalid wrapping bounds.");
|
||||
let width = max - min;
|
||||
|
||||
@ -392,9 +388,7 @@ pub fn partial_sort2<'a, T: PartialOrd>(a: &'a T, b: &'a T) -> Option<(&'a T, &'
|
||||
/// * [distance_squared](fn.distance_squared.html)
|
||||
#[inline]
|
||||
pub fn center<N: SimdComplexField, D: DimName>(p1: &Point<N, D>, p2: &Point<N, D>) -> Point<N, D>
|
||||
where
|
||||
DefaultAllocator: Allocator<N, D>,
|
||||
{
|
||||
where DefaultAllocator: Allocator<N, D> {
|
||||
((&p1.coords + &p2.coords) * convert::<_, N>(0.5)).into()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user