diff options
| author | Sébastien Crozet <developer@crozet.re> | 2021-02-04 18:20:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-04 18:20:27 +0100 |
| commit | a272f4ce9eb812bd14114fe95ab614bc8dddfce5 (patch) | |
| tree | 216e07441b294f4424c49d92d1e74e1d94772cbb /src/geometry/collider.rs | |
| parent | a0230408252c9e3f06d4cee4c45831922df0143e (diff) | |
| parent | 85bc81d4fce29bf628d31cb978aa482e564aab90 (diff) | |
| download | rapier-a272f4ce9eb812bd14114fe95ab614bc8dddfce5.tar.gz rapier-a272f4ce9eb812bd14114fe95ab614bc8dddfce5.tar.bz2 rapier-a272f4ce9eb812bd14114fe95ab614bc8dddfce5.zip | |
Merge pull request #104 from EmbarkStudios/clippy-fixes
Make clippy a bit happier
Diffstat (limited to 'src/geometry/collider.rs')
| -rw-r--r-- | src/geometry/collider.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs index fa2da68..ce263f8 100644 --- a/src/geometry/collider.rs +++ b/src/geometry/collider.rs @@ -361,14 +361,14 @@ impl ColliderBuilder { /// Initializes a new collider builder with a 2D convex polygon or 3D convex polyhedron /// obtained after computing the convex-hull of the given points. pub fn convex_hull(points: &[Point<Real>]) -> Option<Self> { - SharedShape::convex_hull(points).map(|cp| Self::new(cp)) + SharedShape::convex_hull(points).map(Self::new) } /// Initializes a new collider builder with a round 2D convex polygon or 3D convex polyhedron /// obtained after computing the convex-hull of the given points. The shape is dilated /// by a sphere of radius `border_radius`. pub fn round_convex_hull(points: &[Point<Real>], border_radius: Real) -> Option<Self> { - SharedShape::round_convex_hull(points, border_radius).map(|cp| Self::new(cp)) + SharedShape::round_convex_hull(points, border_radius).map(Self::new) } /// Creates a new collider builder that is a convex polygon formed by the @@ -376,7 +376,7 @@ impl ColliderBuilder { /// computed). #[cfg(feature = "dim2")] pub fn convex_polyline(points: Vec<Point<Real>>) -> Option<Self> { - SharedShape::convex_polyline(points).map(|cp| Self::new(cp)) + SharedShape::convex_polyline(points).map(Self::new) } /// Creates a new collider builder that is a round convex polygon formed by the @@ -384,7 +384,7 @@ impl ColliderBuilder { /// computed). The polygon shape is dilated by a sphere of radius `border_radius`. #[cfg(feature = "dim2")] pub fn round_convex_polyline(points: Vec<Point<Real>>, border_radius: Real) -> Option<Self> { - SharedShape::round_convex_polyline(points, border_radius).map(|cp| Self::new(cp)) + SharedShape::round_convex_polyline(points, border_radius).map(Self::new) } /// Creates a new collider builder that is a convex polyhedron formed by the @@ -392,7 +392,7 @@ impl ColliderBuilder { /// computed). #[cfg(feature = "dim3")] pub fn convex_mesh(points: Vec<Point<Real>>, indices: &[[u32; 3]]) -> Option<Self> { - SharedShape::convex_mesh(points, indices).map(|cp| Self::new(cp)) + SharedShape::convex_mesh(points, indices).map(Self::new) } /// Creates a new collider builder that is a round convex polyhedron formed by the @@ -404,7 +404,7 @@ impl ColliderBuilder { indices: &[[u32; 3]], border_radius: Real, ) -> Option<Self> { - SharedShape::round_convex_mesh(points, indices, border_radius).map(|cp| Self::new(cp)) + SharedShape::round_convex_mesh(points, indices, border_radius).map(Self::new) } /// Initializes a collider builder with a heightfield shape defined by its set of height and a scale |
