From 2ba91313efd96cbe74af8a5f73f559188bc7f0b8 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 18 Mar 2022 13:57:10 +0100 Subject: [PATCH] Simplify method return value --- fj-app/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fj-app/src/main.rs b/fj-app/src/main.rs index fd1114769..729145c18 100644 --- a/fj-app/src/main.rs +++ b/fj-app/src/main.rs @@ -95,7 +95,7 @@ fn main() -> anyhow::Result<()> { let shape = model.load(¶meters)?; let shape_processor = ShapeProcessor::new(args.tolerance)?; - let mut processed_shape = shape_processor.process(&shape)?; + let mut processed_shape = shape_processor.process(&shape); if let Some(path) = args.export { let mut mesh_maker = MeshMaker::new(); @@ -362,7 +362,7 @@ impl ShapeProcessor { Ok(Self { tolerance }) } - fn process(&self, shape: &fj::Shape) -> anyhow::Result { + fn process(&self, shape: &fj::Shape) -> ProcessedShape { let aabb = shape.bounding_volume(); let tolerance = match self.tolerance { @@ -393,12 +393,12 @@ impl ShapeProcessor { .topology() .triangles(tolerance, &mut triangles, &mut debug_info); - Ok(ProcessedShape { + ProcessedShape { tolerance, aabb, triangles, debug_info, - }) + } } }