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/narrow_phase.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/narrow_phase.rs')
| -rw-r--r-- | src/geometry/narrow_phase.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/geometry/narrow_phase.rs b/src/geometry/narrow_phase.rs index c462689..7525a68 100644 --- a/src/geometry/narrow_phase.rs +++ b/src/geometry/narrow_phase.rs @@ -90,10 +90,10 @@ impl NarrowPhase { } /// All the intersections involving the given collider. - pub fn intersections_with<'a>( - &'a self, + pub fn intersections_with( + &self, collider: ColliderHandle, - ) -> Option<impl Iterator<Item = (ColliderHandle, ColliderHandle, bool)> + 'a> { + ) -> Option<impl Iterator<Item = (ColliderHandle, ColliderHandle, bool)> + '_> { let id = self.graph_indices.get(collider.0)?; Some( self.intersection_graph @@ -141,9 +141,9 @@ impl NarrowPhase { } /// All the intersection pairs maintained by this narrow-phase. - pub fn intersection_pairs<'a>( - &'a self, - ) -> impl Iterator<Item = (ColliderHandle, ColliderHandle, bool)> + 'a { + pub fn intersection_pairs( + &self, + ) -> impl Iterator<Item = (ColliderHandle, ColliderHandle, bool)> + '_ { self.intersection_graph .interactions_with_endpoints() .map(|e| (e.0, e.1, *e.2)) @@ -161,7 +161,7 @@ impl NarrowPhase { self.removed_colliders = Some(colliders.removed_colliders.subscribe()); } - let mut cursor = self.removed_colliders.take().unwrap(); + let cursor = self.removed_colliders.take().unwrap(); // TODO: avoid these hash-maps. // They are necessary to handle the swap-remove done internally @@ -196,11 +196,11 @@ impl NarrowPhase { i += 1; } - colliders.removed_colliders.ack(&mut cursor); + colliders.removed_colliders.ack(&cursor); self.removed_colliders = Some(cursor); } - pub(crate) fn remove_collider<'a>( + pub(crate) fn remove_collider( &mut self, intersection_graph_id: ColliderGraphIndex, contact_graph_id: ColliderGraphIndex, |
