diff options
author | HampusM <hampus@hampusmat.com> | 2024-05-18 16:22:09 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-05-18 16:22:09 +0200 |
commit | d7675fd0119afe5e9cc872ce8bbb2977a16f0b26 (patch) | |
tree | 6272815d164671cc95520e3590fe1b6c396bf210 /engine/src/file_format | |
parent | 9af501c99880b2e4be3458bab0891e1ea1a2e4a0 (diff) |
refactor(engine): generate vertex builder using the builder macro
Diffstat (limited to 'engine/src/file_format')
-rw-r--r-- | engine/src/file_format/wavefront/obj.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/src/file_format/wavefront/obj.rs b/engine/src/file_format/wavefront/obj.rs index 6367ead..97e0110 100644 --- a/engine/src/file_format/wavefront/obj.rs +++ b/engine/src/file_format/wavefront/obj.rs @@ -297,7 +297,7 @@ impl FaceVertex /// Tries to convert this face vertex into a [`Vertex`]. pub fn to_vertex(&self, obj: &Obj) -> Result<Vertex, Error> { - let mut vertex_builder = VertexBuilder::new(); + let mut vertex_builder = VertexBuilder::default(); let vertex_pos = *obj.vertex_positions.get(self.position as usize - 1).ok_or( Error::FaceVertexPositionNotFound { vertex_pos_index: self.position }, @@ -327,7 +327,7 @@ impl FaceVertex vertex_builder = vertex_builder.normal(vertex_normal); } - Ok(vertex_builder.build().unwrap()) + Ok(vertex_builder.build()) } } |