diff --git a/strafe-client/src/model_physics.rs b/strafe-client/src/model_physics.rs index d9d30f1..bdcdcb9 100644 --- a/strafe-client/src/model_physics.rs +++ b/strafe-client/src/model_physics.rs @@ -287,7 +287,7 @@ impl EdgePool{ self.edge_id_from_guy.insert(edge_ref_verts,edge_id); edge_id }; - (&mut unsafe{self.edge_guys.get_unchecked_mut(edge_id.get() as usize)}.1,edge_id) + (&mut self.edge_guys[edge_id.get() as usize].1,edge_id) } } @@ -367,7 +367,7 @@ impl TryFrom<&model::Mesh> for PhysicsMesh{ let vert_ref_guy=unsafe{vert_ref_guys.get_unchecked_mut(submesh_vert0_id.get() as usize)}; vert_ref_guy.edges.insert(edge_id.as_directed(is_sorted)); vert_ref_guy.faces.insert(submesh_face_id); - unsafe{vert_ref_guys.get_unchecked_mut(submesh_vert1_id.get() as usize)}.edges.insert(edge_id.as_directed(!is_sorted)); + vert_ref_guys[submesh_vert1_id.get() as usize].edges.insert(edge_id.as_directed(!is_sorted)); } //return directed_edge_id edge_id.as_directed(is_sorted)