Skip to content

Commit e7dd3d3

Browse files
committed
Fix deprecation
1 parent 65256b1 commit e7dd3d3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/bevy_xpbd_3d/examples/cast_ray_predicate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ fn raycast(
190190
}
191191
}
192192

193-
// set length of rayindicator to look more like a laser
193+
// set length of ray indicator to look more like a laser
194194
let contact_point = (origin + direction * ray_hit_data.time_of_impact).x;
195195
let target_scale = 1000.0 + contact_point * 2.0;
196196
ray_indicator_transform.scale.x = target_scale as f32;

src/plugins/collision/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ impl Collisions {
229229
/// The order of the entities does not matter.
230230
pub fn remove_collision_pair(&mut self, entity1: Entity, entity2: Entity) -> Option<Contacts> {
231231
self.0
232-
.remove(&(entity1, entity2))
233-
.or_else(|| self.0.remove(&(entity2, entity1)))
232+
.swap_remove(&(entity1, entity2))
233+
.or_else(|| self.0.swap_remove(&(entity2, entity1)))
234234
}
235235

236236
/// Removes all collisions that involve the given entity.

0 commit comments

Comments
 (0)