From a2369b42111eeb3e6772c4b8eec0b76bbd6b6f30 Mon Sep 17 00:00:00 2001 From: Quaternions <krakow20@gmail.com> Date: Sun, 9 Mar 2025 23:46:43 -0700 Subject: [PATCH] rbx_loader: never do &Vec + deconstruct Face2 (style) --- lib/rbx_loader/src/mesh.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rbx_loader/src/mesh.rs b/lib/rbx_loader/src/mesh.rs index 2b3bb60a0..45197b559 100644 --- a/lib/rbx_loader/src/mesh.rs +++ b/lib/rbx_loader/src/mesh.rs @@ -84,13 +84,13 @@ where fn ingest_faces2_lods3( polygon_groups:&mut Vec<PolygonGroup>, vertex_id_map:&HashMap<rbx_mesh::mesh::VertexId2,VertexId>, - faces:&Vec<rbx_mesh::mesh::Face2>, - lods:&Vec<rbx_mesh::mesh::Lod3> + faces:&[rbx_mesh::mesh::Face2], + lods:&[rbx_mesh::mesh::Lod3], ){ //faces have to be split into polygon groups based on lod polygon_groups.extend(lods.windows(2).map(|lod_pair| - PolygonGroup::PolygonList(PolygonList::new(faces[lod_pair[0].0 as usize..lod_pair[1].0 as usize].iter().map(|face| - vec![vertex_id_map[&face.0],vertex_id_map[&face.1],vertex_id_map[&face.2]] + PolygonGroup::PolygonList(PolygonList::new(faces[lod_pair[0].0 as usize..lod_pair[1].0 as usize].iter().map(|rbx_mesh::mesh::Face2(v0,v1,v2)| + vec![vertex_id_map[&v0],vertex_id_map[&v1],vertex_id_map[&v2]] ).collect())) )) }