summaryrefslogtreecommitdiff
path: root/src/sim/sim_manager/utils.rs
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2026-09-01 19:08:17 -0700
committerKai Stevenson <kai@kaistevenson.com>2026-09-01 19:08:17 -0700
commit7eedb19a5f28150a28b8cf1ec5fb08139d6b5590 (patch)
tree7a2b43902bda122e7c025d0abbda22a4de936860 /src/sim/sim_manager/utils.rs
parent2335bd23e3b4e09177ff02e236612b78c1730b9c (diff)
lint
Diffstat (limited to 'src/sim/sim_manager/utils.rs')
-rw-r--r--src/sim/sim_manager/utils.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sim/sim_manager/utils.rs b/src/sim/sim_manager/utils.rs
index 45960bf..5bb7573 100644
--- a/src/sim/sim_manager/utils.rs
+++ b/src/sim/sim_manager/utils.rs
@@ -159,7 +159,7 @@ pub fn read_back_entities_from_world(
let ec = entity.data.cells.as_mut().unwrap();
// first check if the entity has been partitioned
let components = compute_components(&ec.cells, ec.size.x, ec.size.y);
- if components.len() == 0 {
+ if components.is_empty() {
sim.destroy_entity(entity_id);
} else if components.len() == 1 {
// the entity's cells were changed, but not partitioned
@@ -193,9 +193,9 @@ pub fn read_back_entities_from_world(
.get(entity.data.rb_h.unwrap())
// correctness -- not correct! because we don't have pos without rb
.unwrap();
- let old_pose = old_rb.position().clone();
- let old_linvel = old_rb.linvel().clone();
- let old_angvel = old_rb.angvel().clone();
+ let old_pose = *old_rb.position();
+ let old_linvel = old_rb.linvel();
+ let old_angvel = old_rb.angvel();
sim.destroy_entity(entity_id);