diff options
author | HampusM <hampus@hampusmat.com> | 2024-08-21 19:23:13 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-08-21 19:23:13 +0200 |
commit | de5c5f54bfd6881d8da07f40cd16f28e40cb886a (patch) | |
tree | b143eaa9a1a47d46328930942f8ea6f1ccebd5c7 /engine/src | |
parent | 873dcd5dd712a2449e8ba59d076ac64399692d61 (diff) |
refactor(engine): use inline const in mesh::cube::create
Diffstat (limited to 'engine/src')
-rw-r--r-- | engine/src/mesh/cube.rs | 3 |
1 files changed, 1 insertions, 2 deletions
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<Vertex>; 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); |