From 445d1fc13e912f9717309b4a284933165aa6798f Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Thu, 5 Dec 2024 14:46:12 +0100 Subject: [PATCH] fix a few needless lifetimes, + ignore them for bevy where we often want explicitness --- crates/rapier_testbed2d-f64/Cargo.toml | 3 +++ crates/rapier_testbed2d/Cargo.toml | 3 +++ crates/rapier_testbed3d-f64/Cargo.toml | 3 +++ crates/rapier_testbed3d/Cargo.toml | 3 +++ examples2d/trimesh2.rs | 2 +- src_testbed/testbed.rs | 4 ++-- 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/crates/rapier_testbed2d-f64/Cargo.toml b/crates/rapier_testbed2d-f64/Cargo.toml index fab895872..16b65b714 100644 --- a/crates/rapier_testbed2d-f64/Cargo.toml +++ b/crates/rapier_testbed2d-f64/Cargo.toml @@ -41,6 +41,9 @@ unstable-puffin-pr-235 = [] [package.metadata.docs.rs] features = ["parallel", "profiling"] +[lints.clippy] +needless_lifetimes = "allow" + [dependencies] nalgebra = { version = "0.33", features = ["rand", "glam027"] } rand = "0.8" diff --git a/crates/rapier_testbed2d/Cargo.toml b/crates/rapier_testbed2d/Cargo.toml index b95966f3d..f16d5554c 100644 --- a/crates/rapier_testbed2d/Cargo.toml +++ b/crates/rapier_testbed2d/Cargo.toml @@ -41,6 +41,9 @@ unstable-puffin-pr-235 = [] [package.metadata.docs.rs] features = ["parallel", "other-backends", "profiling"] +[lints.clippy] +needless_lifetimes = "allow" + [dependencies] nalgebra = { version = "0.33", features = ["rand", "glam027"] } rand = "0.8" diff --git a/crates/rapier_testbed3d-f64/Cargo.toml b/crates/rapier_testbed3d-f64/Cargo.toml index 97d1a5420..f023d8628 100644 --- a/crates/rapier_testbed3d-f64/Cargo.toml +++ b/crates/rapier_testbed3d-f64/Cargo.toml @@ -43,6 +43,9 @@ unstable-puffin-pr-235 = [] [package.metadata.docs.rs] features = ["parallel", "profiling"] +[lints.clippy] +needless_lifetimes = "allow" + [dependencies] nalgebra = { version = "0.33", features = ["rand", "glam027"] } rand = "0.8" diff --git a/crates/rapier_testbed3d/Cargo.toml b/crates/rapier_testbed3d/Cargo.toml index 2b536abd1..916bdd57a 100644 --- a/crates/rapier_testbed3d/Cargo.toml +++ b/crates/rapier_testbed3d/Cargo.toml @@ -41,6 +41,9 @@ unstable-puffin-pr-235 = [] [package.metadata.docs.rs] features = ["parallel", "other-backends", "profiling"] +[lints.clippy] +needless_lifetimes = "allow" + [dependencies] nalgebra = { version = "0.33", features = ["rand", "glam027"] } rand = "0.8" diff --git a/examples2d/trimesh2.rs b/examples2d/trimesh2.rs index a295db552..a57c0fe08 100644 --- a/examples2d/trimesh2.rs +++ b/examples2d/trimesh2.rs @@ -143,7 +143,7 @@ pub struct PathConvIter<'a> { deferred: Option, } -impl<'l> Iterator for PathConvIter<'l> { +impl Iterator for PathConvIter<'_> { type Item = PathEvent; fn next(&mut self) -> Option { if self.deferred.is_some() { diff --git a/src_testbed/testbed.rs b/src_testbed/testbed.rs index fa7f731d4..9f1bf202d 100644 --- a/src_testbed/testbed.rs +++ b/src_testbed/testbed.rs @@ -469,7 +469,7 @@ impl TestbedApp { } } -impl<'a, 'b, 'c, 'd, 'e, 'f> TestbedGraphics<'a, 'b, 'c, 'd, 'e, 'f> { +impl TestbedGraphics<'_, '_, '_, '_, '_, '_> { pub fn set_body_color(&mut self, body: RigidBodyHandle, color: [f32; 3]) { self.graphics.set_body_color(self.materials, body, color); } @@ -526,7 +526,7 @@ impl<'a, 'b, 'c, 'd, 'e, 'f> TestbedGraphics<'a, 'b, 'c, 'd, 'e, 'f> { } } -impl<'a, 'b, 'c, 'd, 'e, 'f> Testbed<'a, 'b, 'c, 'd, 'e, 'f> { +impl Testbed<'_, '_, '_, '_, '_, '_> { pub fn set_number_of_steps_per_frame(&mut self, nsteps: usize) { self.state.nsteps = nsteps }