diff options
Diffstat (limited to 'engine/src/file_format/wavefront/obj.rs')
| -rw-r--r-- | engine/src/file_format/wavefront/obj.rs | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/engine/src/file_format/wavefront/obj.rs b/engine/src/file_format/wavefront/obj.rs index 446903c..ebbbe45 100644 --- a/engine/src/file_format/wavefront/obj.rs +++ b/engine/src/file_format/wavefront/obj.rs @@ -7,18 +7,18 @@ use std::fs::read_to_string; use std::path::PathBuf; use crate::file_format::wavefront::common::{ + keyword, + parse_statement_line, ParsingError, Statement, Triplet, - keyword, - parse_statement_line, }; use crate::mesh::vertex_buffer::{ NamedVertexAttr, VertexAttrInfo, VertexBuffer as MeshVertexBuffer, }; -use crate::mesh::{Mesh, POSITION_VERTEX_ATTRIB_NAME, VertexAttrType}; +use crate::mesh::{Mesh, VertexAttrType, POSITION_VERTEX_ATTRIB_NAME}; use crate::util::try_option; use crate::vector::{Vec2, Vec3}; @@ -264,7 +264,9 @@ pub enum Error #[error(transparent)] ParsingError(#[from] ParsingError), - #[error("Face vertex position with index {vertex_pos_index} (1-based) was not found")] + #[error( + "Face vertex position with index {vertex_pos_index} (1-based) was not found" + )] FaceVertexPositionNotFound { vertex_pos_index: u32 @@ -567,16 +569,12 @@ fn get_mtl_libs_from_statements( return None; } - let mtl_lib_paths = try_option!( - statement - .arguments - .iter() - .enumerate() - .map(|(index, value)| Ok(PathBuf::from( - value.to_text(index, *line_no)? - ))) - .collect::<Result<Vec<_>, ParsingError>>() - ); + let mtl_lib_paths = try_option!(statement + .arguments + .iter() + .enumerate() + .map(|(index, value)| Ok(PathBuf::from(value.to_text(index, *line_no)?))) + .collect::<Result<Vec<_>, ParsingError>>()); Some(Ok(mtl_lib_paths)) }) |
