Fixed cargo fmt

This commit is contained in:
Yuri Edward 2021-10-19 16:18:25 +02:00
parent 0e2865085e
commit 94ef916f49
4 changed files with 11 additions and 18 deletions

View File

@ -210,7 +210,8 @@ impl<T: Scalar, const D: usize> Scale<T, D> {
where where
T: Zero + One + Clone, T: Zero + One + Clone,
Const<D>: DimNameAdd<U1>, Const<D>: DimNameAdd<U1>,
DefaultAllocator: Allocator<T, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>> + Allocator<T, DimNameSum<Const<D>, U1>, U1>, DefaultAllocator: Allocator<T, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>
+ Allocator<T, DimNameSum<Const<D>, U1>, U1>,
{ {
// Unfortunately rust refuses at all costs to allow calling .to_homogeneous on a SVector // Unfortunately rust refuses at all costs to allow calling .to_homogeneous on a SVector
// (self.vector) so I had to do a manual copy in a new OVector // (self.vector) so I had to do a manual copy in a new OVector

View File

@ -3,7 +3,7 @@ use crate::base::storage::Owned;
#[cfg(feature = "arbitrary")] #[cfg(feature = "arbitrary")]
use quickcheck::{Arbitrary, Gen}; use quickcheck::{Arbitrary, Gen};
use num::{One}; use num::One;
#[cfg(feature = "rand-no-std")] #[cfg(feature = "rand-no-std")]
use rand::{ use rand::{
distributions::{Distribution, Standard}, distributions::{Distribution, Standard},

View File

@ -7,9 +7,7 @@ use crate::base::allocator::Allocator;
use crate::base::dimension::{DimNameAdd, DimNameSum, U1}; use crate::base::dimension::{DimNameAdd, DimNameSum, U1};
use crate::base::{Const, DefaultAllocator, DimName, OMatrix, OVector, SVector, Scalar}; use crate::base::{Const, DefaultAllocator, DimName, OMatrix, OVector, SVector, Scalar};
use crate::geometry::{ use crate::geometry::{Scale, SuperTCategoryOf, TAffine, Transform};
SuperTCategoryOf, TAffine, Transform, Scale
};
use crate::Point; use crate::Point;
/* /*
@ -50,8 +48,7 @@ where
T2: RealField + SupersetOf<T1>, T2: RealField + SupersetOf<T1>,
C: SuperTCategoryOf<TAffine>, C: SuperTCategoryOf<TAffine>,
Const<D>: DimNameAdd<U1>, Const<D>: DimNameAdd<U1>,
DefaultAllocator: DefaultAllocator: Allocator<T1, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>
Allocator<T1, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>
+ Allocator<T1, DimNameSum<Const<D>, U1>, U1> + Allocator<T1, DimNameSum<Const<D>, U1>, U1>
+ Allocator<T2, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>, + Allocator<T2, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>,
{ {
@ -77,8 +74,7 @@ where
T1: RealField, T1: RealField,
T2: RealField + SupersetOf<T1>, T2: RealField + SupersetOf<T1>,
Const<D>: DimNameAdd<U1>, Const<D>: DimNameAdd<U1>,
DefaultAllocator: DefaultAllocator: Allocator<T1, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>
Allocator<T1, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>
+ Allocator<T1, DimNameSum<Const<D>, U1>, U1> + Allocator<T1, DimNameSum<Const<D>, U1>, U1>
+ Allocator<T2, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>, + Allocator<T2, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>,
// + Allocator<T1, D> // + Allocator<T1, D>
@ -116,8 +112,7 @@ impl<T: Scalar + Zero + One, const D: usize> From<Scale<T, D>>
for OMatrix<T, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>> for OMatrix<T, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>
where where
Const<D>: DimNameAdd<U1>, Const<D>: DimNameAdd<U1>,
DefaultAllocator: DefaultAllocator: Allocator<T, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>
Allocator<T, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>
+ Allocator<T, DimNameSum<Const<D>, U1>, U1> + Allocator<T, DimNameSum<Const<D>, U1>, U1>
+ Allocator<T, Const<D>>, + Allocator<T, Const<D>>,
{ {
@ -157,8 +152,7 @@ impl<T: Scalar, const D: usize> From<Scale<T, D>> for [T; D] {
} }
} }
impl<T: Scalar + PrimitiveSimdValue, const D: usize> From<[Scale<T::Element, D>; 2]> impl<T: Scalar + PrimitiveSimdValue, const D: usize> From<[Scale<T::Element, D>; 2]> for Scale<T, D>
for Scale<T, D>
where where
T: From<[<T as simba::simd::SimdValue>::Element; 2]>, T: From<[<T as simba::simd::SimdValue>::Element; 2]>,
T::Element: Scalar, T::Element: Scalar,
@ -172,8 +166,7 @@ where
} }
} }
impl<T: Scalar + PrimitiveSimdValue, const D: usize> From<[Scale<T::Element, D>; 4]> impl<T: Scalar + PrimitiveSimdValue, const D: usize> From<[Scale<T::Element, D>; 4]> for Scale<T, D>
for Scale<T, D>
where where
T: From<[<T as simba::simd::SimdValue>::Element; 4]>, T: From<[<T as simba::simd::SimdValue>::Element; 4]>,
T::Element: Scalar, T::Element: Scalar,
@ -189,8 +182,7 @@ where
} }
} }
impl<T: Scalar + PrimitiveSimdValue, const D: usize> From<[Scale<T::Element, D>; 8]> impl<T: Scalar + PrimitiveSimdValue, const D: usize> From<[Scale<T::Element, D>; 8]> for Scale<T, D>
for Scale<T, D>
where where
T: From<[<T as simba::simd::SimdValue>::Element; 8]>, T: From<[<T as simba::simd::SimdValue>::Element; 8]>,
T::Element: Scalar, T::Element: Scalar,

View File

@ -1,6 +1,6 @@
use std::ops::{Mul, MulAssign}; use std::ops::{Mul, MulAssign};
use simba::scalar::{ClosedMul}; use simba::scalar::ClosedMul;
use crate::base::constraint::{SameNumberOfColumns, SameNumberOfRows, ShapeConstraint}; use crate::base::constraint::{SameNumberOfColumns, SameNumberOfRows, ShapeConstraint};
use crate::base::dimension::U1; use crate::base::dimension::U1;