Skip to content

Commit

Permalink
cargo clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz committed Dec 5, 2024
1 parent 6f32753 commit 11f6485
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/partitioning/qbvh/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct BuilderProxies<'a, LeafData> {
aabbs: &'a mut Vec<Aabb>,
}

impl<'a, LeafData> BuilderProxies<'a, LeafData> {
impl<LeafData> BuilderProxies<'_, LeafData> {
fn insert(&mut self, data: LeafData, aabb: Aabb)
where
LeafData: IndexedData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ where
}
}

impl<'a, D, G1> SimdBestFirstVisitor<G1::PartId, SimdAabb>
for CompositeShapeAgainstShapeClosestPointsVisitor<'a, D, G1>
impl<D, G1> SimdBestFirstVisitor<G1::PartId, SimdAabb>
for CompositeShapeAgainstShapeClosestPointsVisitor<'_, D, G1>
where
D: ?Sized + QueryDispatcher,
G1: ?Sized + TypedSimdCompositeShape,
Expand Down
4 changes: 2 additions & 2 deletions src/query/distance/distance_composite_shape_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ impl<'a, D: ?Sized, G1: ?Sized + 'a> CompositeShapeAgainstAnyDistanceVisitor<'a,
}
}

impl<'a, D, G1> SimdBestFirstVisitor<G1::PartId, SimdAabb>
for CompositeShapeAgainstAnyDistanceVisitor<'a, D, G1>
impl<D, G1> SimdBestFirstVisitor<G1::PartId, SimdAabb>
for CompositeShapeAgainstAnyDistanceVisitor<'_, D, G1>
where
D: ?Sized + QueryDispatcher,
G1: ?Sized + TypedSimdCompositeShape,
Expand Down
2 changes: 1 addition & 1 deletion src/query/gjk/special_support_maps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<S: ?Sized + SupportMap> SupportMap for DilatedShape<'_, S> {
#[inline]
fn support_point(&self, m: &Isometry<Real>, dir: &Vector<Real>) -> Point<Real> {
self.support_point_toward(m, &Unit::new_normalize(*dir))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ where
}
}

impl<'a, D, G1> SimdVisitor<G1::PartId, SimdAabb>
for IntersectionCompositeShapeShapeVisitor<'a, D, G1>
impl<D, G1> SimdVisitor<G1::PartId, SimdAabb>
for IntersectionCompositeShapeShapeVisitor<'_, D, G1>
where
D: ?Sized + QueryDispatcher,
G1: ?Sized + TypedSimdCompositeShape,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ where
}
}

impl<'a, D, G1> SimdBestFirstVisitor<G1::PartId, SimdAabb>
for NonlinearTOICompositeShapeShapeBestFirstVisitor<'a, D, G1>
impl<D, G1> SimdBestFirstVisitor<G1::PartId, SimdAabb>
for NonlinearTOICompositeShapeShapeBestFirstVisitor<'_, D, G1>
where
D: ?Sized + QueryDispatcher,
G1: ?Sized + TypedSimdCompositeShape,
Expand Down
8 changes: 4 additions & 4 deletions src/query/ray/ray_composite_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ impl<'a, S> RayCompositeShapeToiBestFirstVisitor<'a, S> {
}
}

impl<'a, S> SimdBestFirstVisitor<S::PartId, SimdAabb>
for RayCompositeShapeToiBestFirstVisitor<'a, S>
impl<S> SimdBestFirstVisitor<S::PartId, SimdAabb>
for RayCompositeShapeToiBestFirstVisitor<'_, S>
where
S: TypedSimdCompositeShape,
{
Expand Down Expand Up @@ -222,8 +222,8 @@ impl<'a, S> RayCompositeShapeToiAndNormalBestFirstVisitor<'a, S> {
}
}

impl<'a, S> SimdBestFirstVisitor<S::PartId, SimdAabb>
for RayCompositeShapeToiAndNormalBestFirstVisitor<'a, S>
impl<S> SimdBestFirstVisitor<S::PartId, SimdAabb>
for RayCompositeShapeToiAndNormalBestFirstVisitor<'_, S>
where
S: TypedSimdCompositeShape,
{
Expand Down
4 changes: 2 additions & 2 deletions src/query/shape_cast/shape_cast_composite_shape_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ where
}
}

impl<'a, D, G1> SimdBestFirstVisitor<G1::PartId, SimdAabb>
for TOICompositeShapeShapeBestFirstVisitor<'a, D, G1>
impl<D, G1> SimdBestFirstVisitor<G1::PartId, SimdAabb>
for TOICompositeShapeShapeBestFirstVisitor<'_, D, G1>
where
D: ?Sized + QueryDispatcher,
G1: ?Sized + TypedSimdCompositeShape,
Expand Down
4 changes: 2 additions & 2 deletions src/query/visitors/composite_closest_point_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ impl<'a, S> CompositeClosestPointVisitor<'a, S> {
}
}

impl<'a, S: SimdCompositeShape + PointQuery> SimdBestFirstVisitor<u32, SimdAabb>
for CompositeClosestPointVisitor<'a, S>
impl<S: SimdCompositeShape + PointQuery> SimdBestFirstVisitor<u32, SimdAabb>
for CompositeClosestPointVisitor<'_, S>
{
type Result = PointProjection;

Expand Down
4 changes: 2 additions & 2 deletions src/query/visitors/composite_point_containment_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ impl<'a, S> CompositePointContainmentTest<'a, S> {
}
}

impl<'a, S: TypedSimdCompositeShape> SimdVisitor<S::PartId, SimdAabb>
for CompositePointContainmentTest<'a, S>
impl<S: TypedSimdCompositeShape> SimdVisitor<S::PartId, SimdAabb>
for CompositePointContainmentTest<'_, S>
{
#[inline]
fn visit(
Expand Down
2 changes: 1 addition & 1 deletion src/query/visitors/point_intersections_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ where
}
}

impl<'a, T, F> SimdVisitor<T, SimdAabb> for PointIntersectionsVisitor<'a, T, F>
impl<T, F> SimdVisitor<T, SimdAabb> for PointIntersectionsVisitor<'_, T, F>
where
F: FnMut(&T) -> bool,
{
Expand Down
2 changes: 1 addition & 1 deletion src/query/visitors/ray_intersections_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ where
}
}

impl<'a, T, F> SimdVisitor<T, SimdAabb> for RayIntersectionsVisitor<'a, T, F>
impl<T, F> SimdVisitor<T, SimdAabb> for RayIntersectionsVisitor<'_, T, F>
where
F: FnMut(&T) -> bool,
{
Expand Down
2 changes: 1 addition & 1 deletion src/shape/composite_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/shape/heightfield3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ struct HeightFieldTriangles<'a> {
tris: (Option<Triangle>, Option<Triangle>),
}

impl<'a> Iterator for HeightFieldTriangles<'a> {
impl Iterator for HeightFieldTriangles<'_> {
type Item = Triangle;

fn next(&mut self) -> Option<Triangle> {
Expand Down Expand Up @@ -819,7 +819,7 @@ pub struct HeightFieldRadialTriangles<'a> {
tris: (Option<Triangle>, Option<Triangle>),
}

impl<'a> HeightFieldRadialTriangles<'a> {
impl HeightFieldRadialTriangles<'_> {
/// Returns the next triangle in this iterator.
///
/// Returns `None` no triangle closest than `max_dist` remain
Expand Down
2 changes: 1 addition & 1 deletion src/shape/round_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<S: ?Sized + SupportMap> SupportMap for RoundShapeRef<'_, S> {
fn local_support_point(&self, dir: &Vector<Real>) -> Point<Real> {
self.local_support_point_toward(&Unit::new_normalize(*dir))
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/isometry_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub trait IsometryOpt {
fn inverse_transform_unit_vector(self, v: &Unit<Vector<Real>>) -> Unit<Vector<Real>>;
}

impl<'a> IsometryOpt for Option<&'a Isometry<Real>> {
impl IsometryOpt for Option<&Isometry<Real>> {
#[inline]
fn inv_mul(self, rhs: &Isometry<Real>) -> Isometry<Real> {
if let Some(iso) = self {
Expand Down

0 comments on commit 11f6485

Please sign in to comment.