From de5c5f54bfd6881d8da07f40cd16f28e40cb886a Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 21 Aug 2024 19:23:13 +0200 Subject: refactor(engine): use inline const in mesh::cube::create --- engine/src/mesh/cube.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engine/src/mesh') diff --git a/engine/src/mesh/cube.rs b/engine/src/mesh/cube.rs index f00cf6d..ca946bb 100644 --- a/engine/src/mesh/cube.rs +++ b/engine/src/mesh/cube.rs @@ -53,8 +53,7 @@ pub fn create( vertex_builder_cb: impl Fn(VertexBuilder, Side, Corner) -> VertexBuilder, ) -> Mesh { - let mut vertices: [Option; VertexIndex::VARIANT_CNT] = - [(); VertexIndex::VARIANT_CNT].map(|()| None); + let mut vertices = [const { None }; VertexIndex::VARIANT_CNT]; create_front(&creation_spec, &mut vertices, &vertex_builder_cb); create_back(&creation_spec, &mut vertices, &vertex_builder_cb); -- cgit v1.2.3-18-g5258