From 2e76e82cc0acef1aa8ba4e53b47612cf5963ed71 Mon Sep 17 00:00:00 2001 From: maku693 Date: Wed, 23 Feb 2022 17:32:34 +0900 Subject: [PATCH] cargo fmt --- src/macros.rs | 2 +- src/matrix.rs | 2 +- src/quaternion.rs | 2 +- src/structure.rs | 5 ++++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/macros.rs b/src/macros.rs index d0445437..21149e1c 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -373,7 +373,7 @@ macro_rules! impl_mint_conversions { $ArrayN { $( $field: v.$field, )+ } } } - + impl mint::IntoMint for $ArrayN { type MintType = mint::$Mint; } diff --git a/src/matrix.rs b/src/matrix.rs index 254d84e5..814f9e42 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -1558,7 +1558,7 @@ macro_rules! mint_conversions { $MatrixN { $($field: m.$field.into()),+ } } } - + impl mint::IntoMint for $MatrixN { type MintType = mint::$MintN; } diff --git a/src/quaternion.rs b/src/quaternion.rs index 3f1f3185..7b333854 100644 --- a/src/quaternion.rs +++ b/src/quaternion.rs @@ -686,7 +686,7 @@ impl From> for mint::Quaternion { } #[cfg(feature = "mint")] -impl mint::IntoMint for Quaternion { +impl mint::IntoMint for Quaternion { type MintType = mint::Quaternion; } diff --git a/src/structure.rs b/src/structure.rs index 29b57403..89dcbfd9 100644 --- a/src/structure.rs +++ b/src/structure.rs @@ -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());