aboutsummaryrefslogtreecommitdiff
path: root/src/classes/mesh.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/mesh.rs')
-rw-r--r--src/classes/mesh.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/classes/mesh.rs b/src/classes/mesh.rs
index 09efe66..8c80866 100644
--- a/src/classes/mesh.rs
+++ b/src/classes/mesh.rs
@@ -91,14 +91,18 @@ impl Mesh {
pub fn read_indecies(&self) -> Vec<[u32; 3]> {
if self.index_format == 0 {
self.index_buffer
+ .iter()
+ .copied()
.array_chunks::<2>()
- .map(|x| u16::from_le_bytes(*x) as u32)
+ .map(|x| u16::from_le_bytes(x) as u32)
.array_chunks()
.collect()
} else {
self.index_buffer
+ .iter()
+ .copied()
.array_chunks::<4>()
- .map(|x| u32::from_le_bytes(*x))
+ .map(|x| u32::from_le_bytes(x))
.array_chunks()
.collect()
}