cargo fmt

This commit is contained in:
maku693 2022-02-23 17:32:34 +09:00 committed by Dzmitry Malyshau
parent 11a5346291
commit 2e76e82cc0
4 changed files with 7 additions and 4 deletions

View file

@ -373,7 +373,7 @@ macro_rules! impl_mint_conversions {
$ArrayN { $( $field: v.$field, )+ }
}
}
impl<S: Clone> mint::IntoMint for $ArrayN<S> {
type MintType = mint::$Mint<S>;
}

View file

@ -1558,7 +1558,7 @@ macro_rules! mint_conversions {
$MatrixN { $($field: m.$field.into()),+ }
}
}
impl<S: Clone> mint::IntoMint for $MatrixN<S> {
type MintType = mint::$MintN<S>;
}

View file

@ -686,7 +686,7 @@ impl<S: Clone> From<Quaternion<S>> for mint::Quaternion<S> {
}
#[cfg(feature = "mint")]
impl <S: Clone> mint::IntoMint for Quaternion<S> {
impl<S: Clone> mint::IntoMint for Quaternion<S> {
type MintType = mint::Quaternion<S>;
}

View file

@ -406,7 +406,10 @@ where
/// let centroid = Point2::centroid(&triangle);
/// ```
#[inline]
fn centroid(points: &[Self]) -> Self where Self::Scalar: NumCast {
fn centroid(points: &[Self]) -> Self
where
Self::Scalar: NumCast,
{
let total_displacement = points
.iter()
.fold(Self::Diff::zero(), |acc, p| acc + p.to_vec());