Inline redundant variable

This commit is contained in:
Hanno Braun 2024-10-30 01:29:25 +01:00
parent fc595f6246
commit d344880c75

View File

@ -1,17 +1,6 @@
use crate::mesh::Mesh;
pub fn model() -> anyhow::Result<Mesh> {
let vertices = vec![
[-0.5, -0.5, -0.5], // 0
[0.5, -0.5, -0.5], // 1
[-0.5, 0.5, -0.5], // 2
[0.5, 0.5, -0.5], // 3
[-0.5, -0.5, 0.5], // 4
[0.5, -0.5, 0.5], // 5
[-0.5, 0.5, 0.5], // 6
[0.5, 0.5, 0.5], // 7
];
let triangles = vec![
[0, 4, 6], // left
[0, 6, 2],
@ -28,7 +17,16 @@ pub fn model() -> anyhow::Result<Mesh> {
];
Ok(Mesh {
vertices,
vertices: vec![
[-0.5, -0.5, -0.5], // 0
[0.5, -0.5, -0.5], // 1
[-0.5, 0.5, -0.5], // 2
[0.5, 0.5, -0.5], // 3
[-0.5, -0.5, 0.5], // 4
[0.5, -0.5, 0.5], // 5
[-0.5, 0.5, 0.5], // 6
[0.5, 0.5, 0.5], // 7
],
triangles,
})
}