Skip to content

Commit

Permalink
fix a few needless lifetimes, + ignore them for bevy where we often w…
Browse files Browse the repository at this point in the history
…ant explicitness
  • Loading branch information
Vrixyz committed Dec 5, 2024
1 parent d13c4df commit 7ea85d4
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 4 deletions.
3 changes: 3 additions & 0 deletions crates/rapier_testbed2d-f64/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions crates/rapier_testbed2d/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions crates/rapier_testbed3d-f64/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions crates/rapier_testbed3d/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion examples2d/trimesh2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pub struct PathConvIter<'a> {
deferred: Option<PathEvent>,
}

impl<'l> Iterator for PathConvIter<'l> {
impl Iterator for PathConvIter<'_> {
type Item = PathEvent;
fn next(&mut self) -> Option<PathEvent> {
if self.deferred.is_some() {
Expand Down
2 changes: 1 addition & 1 deletion src/dynamics/solver/interaction_groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub(crate) trait PairInteraction {
use crate::dynamics::RigidBodyType;

#[cfg(feature = "parallel")]
impl<'a> PairInteraction for &'a mut ContactManifold {
impl PairInteraction for &mut ContactManifold {
fn body_pair(&self) -> (Option<RigidBodyHandle>, Option<RigidBodyHandle>) {
(self.data.rigid_body1, self.data.rigid_body2)
}
Expand Down
4 changes: 2 additions & 2 deletions src_testbed/testbed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 7ea85d4

Please sign in to comment.