From 11f648506a60beda191ccd3e20cf0c97b0462976 Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Thu, 5 Dec 2024 16:49:15 +0100 Subject: [PATCH] cargo clippy fix --- src/partitioning/qbvh/build.rs | 2 +- .../closest_points_composite_shape_shape.rs | 4 ++-- src/query/distance/distance_composite_shape_shape.rs | 4 ++-- src/query/gjk/special_support_maps.rs | 2 +- .../intersection_test_composite_shape_shape.rs | 4 ++-- .../nonlinear_shape_cast_composite_shape_shape.rs | 4 ++-- src/query/ray/ray_composite_shape.rs | 8 ++++---- src/query/shape_cast/shape_cast_composite_shape_shape.rs | 4 ++-- src/query/visitors/composite_closest_point_visitor.rs | 4 ++-- src/query/visitors/composite_point_containment_test.rs | 4 ++-- src/query/visitors/point_intersections_visitor.rs | 2 +- src/query/visitors/ray_intersections_visitor.rs | 2 +- src/shape/composite_shape.rs | 2 +- src/shape/heightfield3.rs | 4 ++-- src/shape/round_shape.rs | 2 +- src/utils/isometry_ops.rs | 2 +- 16 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/partitioning/qbvh/build.rs b/src/partitioning/qbvh/build.rs index 07204302..1c4cdc16 100644 --- a/src/partitioning/qbvh/build.rs +++ b/src/partitioning/qbvh/build.rs @@ -13,7 +13,7 @@ pub struct BuilderProxies<'a, LeafData> { aabbs: &'a mut Vec, } -impl<'a, LeafData> BuilderProxies<'a, LeafData> { +impl BuilderProxies<'_, LeafData> { fn insert(&mut self, data: LeafData, aabb: Aabb) where LeafData: IndexedData, diff --git a/src/query/closest_points/closest_points_composite_shape_shape.rs b/src/query/closest_points/closest_points_composite_shape_shape.rs index ffc35f2a..e8e51906 100644 --- a/src/query/closest_points/closest_points_composite_shape_shape.rs +++ b/src/query/closest_points/closest_points_composite_shape_shape.rs @@ -83,8 +83,8 @@ where } } -impl<'a, D, G1> SimdBestFirstVisitor - for CompositeShapeAgainstShapeClosestPointsVisitor<'a, D, G1> +impl SimdBestFirstVisitor + for CompositeShapeAgainstShapeClosestPointsVisitor<'_, D, G1> where D: ?Sized + QueryDispatcher, G1: ?Sized + TypedSimdCompositeShape, diff --git a/src/query/distance/distance_composite_shape_shape.rs b/src/query/distance/distance_composite_shape_shape.rs index 7c39aa84..60153805 100644 --- a/src/query/distance/distance_composite_shape_shape.rs +++ b/src/query/distance/distance_composite_shape_shape.rs @@ -71,8 +71,8 @@ impl<'a, D: ?Sized, G1: ?Sized + 'a> CompositeShapeAgainstAnyDistanceVisitor<'a, } } -impl<'a, D, G1> SimdBestFirstVisitor - for CompositeShapeAgainstAnyDistanceVisitor<'a, D, G1> +impl SimdBestFirstVisitor + for CompositeShapeAgainstAnyDistanceVisitor<'_, D, G1> where D: ?Sized + QueryDispatcher, G1: ?Sized + TypedSimdCompositeShape, diff --git a/src/query/gjk/special_support_maps.rs b/src/query/gjk/special_support_maps.rs index 1ecc295d..c9f3136c 100644 --- a/src/query/gjk/special_support_maps.rs +++ b/src/query/gjk/special_support_maps.rs @@ -61,7 +61,7 @@ pub struct DilatedShape<'a, S: ?Sized + SupportMap> { pub radius: Real, } -impl<'a, S: ?Sized + SupportMap> SupportMap for DilatedShape<'a, S> { +impl SupportMap for DilatedShape<'_, S> { #[inline] fn support_point(&self, m: &Isometry, dir: &Vector) -> Point { self.support_point_toward(m, &Unit::new_normalize(*dir)) diff --git a/src/query/intersection_test/intersection_test_composite_shape_shape.rs b/src/query/intersection_test/intersection_test_composite_shape_shape.rs index c3a61375..510de4d5 100644 --- a/src/query/intersection_test/intersection_test_composite_shape_shape.rs +++ b/src/query/intersection_test/intersection_test_composite_shape_shape.rs @@ -74,8 +74,8 @@ where } } -impl<'a, D, G1> SimdVisitor - for IntersectionCompositeShapeShapeVisitor<'a, D, G1> +impl SimdVisitor + for IntersectionCompositeShapeShapeVisitor<'_, D, G1> where D: ?Sized + QueryDispatcher, G1: ?Sized + TypedSimdCompositeShape, diff --git a/src/query/nonlinear_shape_cast/nonlinear_shape_cast_composite_shape_shape.rs b/src/query/nonlinear_shape_cast/nonlinear_shape_cast_composite_shape_shape.rs index 950b335d..fd2cf9d7 100644 --- a/src/query/nonlinear_shape_cast/nonlinear_shape_cast_composite_shape_shape.rs +++ b/src/query/nonlinear_shape_cast/nonlinear_shape_cast_composite_shape_shape.rs @@ -111,8 +111,8 @@ where } } -impl<'a, D, G1> SimdBestFirstVisitor - for NonlinearTOICompositeShapeShapeBestFirstVisitor<'a, D, G1> +impl SimdBestFirstVisitor + for NonlinearTOICompositeShapeShapeBestFirstVisitor<'_, D, G1> where D: ?Sized + QueryDispatcher, G1: ?Sized + TypedSimdCompositeShape, diff --git a/src/query/ray/ray_composite_shape.rs b/src/query/ray/ray_composite_shape.rs index 873dd32e..d63ce893 100644 --- a/src/query/ray/ray_composite_shape.rs +++ b/src/query/ray/ray_composite_shape.rs @@ -132,8 +132,8 @@ impl<'a, S> RayCompositeShapeToiBestFirstVisitor<'a, S> { } } -impl<'a, S> SimdBestFirstVisitor - for RayCompositeShapeToiBestFirstVisitor<'a, S> +impl SimdBestFirstVisitor + for RayCompositeShapeToiBestFirstVisitor<'_, S> where S: TypedSimdCompositeShape, { @@ -222,8 +222,8 @@ impl<'a, S> RayCompositeShapeToiAndNormalBestFirstVisitor<'a, S> { } } -impl<'a, S> SimdBestFirstVisitor - for RayCompositeShapeToiAndNormalBestFirstVisitor<'a, S> +impl SimdBestFirstVisitor + for RayCompositeShapeToiAndNormalBestFirstVisitor<'_, S> where S: TypedSimdCompositeShape, { diff --git a/src/query/shape_cast/shape_cast_composite_shape_shape.rs b/src/query/shape_cast/shape_cast_composite_shape_shape.rs index beeebdc2..3464213d 100644 --- a/src/query/shape_cast/shape_cast_composite_shape_shape.rs +++ b/src/query/shape_cast/shape_cast_composite_shape_shape.rs @@ -97,8 +97,8 @@ where } } -impl<'a, D, G1> SimdBestFirstVisitor - for TOICompositeShapeShapeBestFirstVisitor<'a, D, G1> +impl SimdBestFirstVisitor + for TOICompositeShapeShapeBestFirstVisitor<'_, D, G1> where D: ?Sized + QueryDispatcher, G1: ?Sized + TypedSimdCompositeShape, diff --git a/src/query/visitors/composite_closest_point_visitor.rs b/src/query/visitors/composite_closest_point_visitor.rs index 21eebdfd..d523e892 100644 --- a/src/query/visitors/composite_closest_point_visitor.rs +++ b/src/query/visitors/composite_closest_point_visitor.rs @@ -26,8 +26,8 @@ impl<'a, S> CompositeClosestPointVisitor<'a, S> { } } -impl<'a, S: SimdCompositeShape + PointQuery> SimdBestFirstVisitor - for CompositeClosestPointVisitor<'a, S> +impl SimdBestFirstVisitor + for CompositeClosestPointVisitor<'_, S> { type Result = PointProjection; diff --git a/src/query/visitors/composite_point_containment_test.rs b/src/query/visitors/composite_point_containment_test.rs index 5c5a8cec..84818107 100644 --- a/src/query/visitors/composite_point_containment_test.rs +++ b/src/query/visitors/composite_point_containment_test.rs @@ -28,8 +28,8 @@ impl<'a, S> CompositePointContainmentTest<'a, S> { } } -impl<'a, S: TypedSimdCompositeShape> SimdVisitor - for CompositePointContainmentTest<'a, S> +impl SimdVisitor + for CompositePointContainmentTest<'_, S> { #[inline] fn visit( diff --git a/src/query/visitors/point_intersections_visitor.rs b/src/query/visitors/point_intersections_visitor.rs index e502d22f..98dd3e14 100644 --- a/src/query/visitors/point_intersections_visitor.rs +++ b/src/query/visitors/point_intersections_visitor.rs @@ -29,7 +29,7 @@ where } } -impl<'a, T, F> SimdVisitor for PointIntersectionsVisitor<'a, T, F> +impl SimdVisitor for PointIntersectionsVisitor<'_, T, F> where F: FnMut(&T) -> bool, { diff --git a/src/query/visitors/ray_intersections_visitor.rs b/src/query/visitors/ray_intersections_visitor.rs index 4218173d..8f0e4d9d 100644 --- a/src/query/visitors/ray_intersections_visitor.rs +++ b/src/query/visitors/ray_intersections_visitor.rs @@ -33,7 +33,7 @@ where } } -impl<'a, T, F> SimdVisitor for RayIntersectionsVisitor<'a, T, F> +impl SimdVisitor for RayIntersectionsVisitor<'_, T, F> where F: FnMut(&T) -> bool, { diff --git a/src/shape/composite_shape.rs b/src/shape/composite_shape.rs index 95571fc2..db69e46d 100644 --- a/src/shape/composite_shape.rs +++ b/src/shape/composite_shape.rs @@ -45,7 +45,7 @@ pub trait TypedSimdCompositeShape { } #[cfg(feature = "std")] -impl<'a> TypedSimdCompositeShape for dyn SimdCompositeShape + 'a { +impl TypedSimdCompositeShape for dyn SimdCompositeShape + '_ { type PartShape = dyn Shape; type PartNormalConstraints = dyn NormalConstraints; type PartId = u32; diff --git a/src/shape/heightfield3.rs b/src/shape/heightfield3.rs index bef1cb91..58c1b01b 100644 --- a/src/shape/heightfield3.rs +++ b/src/shape/heightfield3.rs @@ -782,7 +782,7 @@ struct HeightFieldTriangles<'a> { tris: (Option, Option), } -impl<'a> Iterator for HeightFieldTriangles<'a> { +impl Iterator for HeightFieldTriangles<'_> { type Item = Triangle; fn next(&mut self) -> Option { @@ -819,7 +819,7 @@ pub struct HeightFieldRadialTriangles<'a> { tris: (Option, Option), } -impl<'a> HeightFieldRadialTriangles<'a> { +impl HeightFieldRadialTriangles<'_> { /// Returns the next triangle in this iterator. /// /// Returns `None` no triangle closest than `max_dist` remain diff --git a/src/shape/round_shape.rs b/src/shape/round_shape.rs index f5bc1492..ddf2859f 100644 --- a/src/shape/round_shape.rs +++ b/src/shape/round_shape.rs @@ -36,7 +36,7 @@ pub(crate) struct RoundShapeRef<'a, S: ?Sized> { pub border_radius: Real, } -impl<'a, S: ?Sized + SupportMap> SupportMap for RoundShapeRef<'a, S> { +impl SupportMap for RoundShapeRef<'_, S> { fn local_support_point(&self, dir: &Vector) -> Point { self.local_support_point_toward(&Unit::new_normalize(*dir)) } diff --git a/src/utils/isometry_ops.rs b/src/utils/isometry_ops.rs index aad0e2b1..6b9403f8 100644 --- a/src/utils/isometry_ops.rs +++ b/src/utils/isometry_ops.rs @@ -51,7 +51,7 @@ pub trait IsometryOpt { fn inverse_transform_unit_vector(self, v: &Unit>) -> Unit>; } -impl<'a> IsometryOpt for Option<&'a Isometry> { +impl IsometryOpt for Option<&Isometry> { #[inline] fn inv_mul(self, rhs: &Isometry) -> Isometry { if let Some(iso) = self {